[Nexus 5 Android Development] danarama:
Nexus 5 known issues / FAQ

Nexus 5 specific changes:

Nexus 5 specific changes are listed below. Please note, not all of these changes were in a single release of Philz. This is a list of changes for the latest version released for the Nexus 5 and all skipped versions released since the previous release for the Nexus 5.

For full change log, please click HERE

Changes between 6.57.9 and 6.57.5

Fixes

-Fix Free Browse mode

Changes between 6.57.5 and 6.50.2

Fixes

-Potential failure to reboot

-Potential failure of TWRP backups

-Regression bug in Advanced menu

-Crash by calling ui_print or LOGE on early recovery init

-Wake-up screen could fail or take a few seconds to reset brightness

-Memory overflow potential issue

Visual

-Group all wipe otions under a same men

-Enhance menu titles

-Keep only mount and storage options in the corresponding menu

-Enhance highlight of virtual keys

-Tweak default recovery keys

-Don't show mount usb storage menu when it is not available

-Always show text in sideload mode

New

-enable screen capture through adb shell

-option to disable md5 from edify restore_rom command line

-support wipe_cache and clear_display edify script commands

Improvements and updates

-SuperSU 2.02

-use built in busybox tar instead of libtar

-drop fb2png binary support

-restore custom rom: preserve selinux attributes

-do not wipe /data/media on wipe_data recovery start command

-do not show mount/unmount /sdcard on /data/media devices …

-support more moint points for /data/media detection

-enhance code to toggle /data/media multi user support

-enhance code to mount auto file system

-do not double confirm formatting /data/media during ext4 <-> f2fs con

-optimize memory resources

-never confirm wipe in ors scripts

-mounts: match aosp sources

Changes between 6.50.2 and 6.47.4

- Various (as yet unspecified) changes

- merge multi stage install packages support from AOSP

- CWM 6.0.5.0

- add option to directly parse time_daemon data files

- refresh current time in menu header after time daemon fixes

- fix first passkey prompt screen did not show proper background under some circumstances

- preserve background icon user settings after sideload, install zip and wipe actions

- use real fstype instead of auto in /etc/fstab when converting between ext4 <-> f2fs using extra.fstab

- recovery lock: support use of virtual / capacitive keys as pass key

Changes between 6.47.4 and 6.47.3

Bugfix version. Fixed adb issue when no keypass set

Changes between 6.47.3 and 6.43.6

See recommendations at the bottom of this post for details on recovery lock...

- add recovery lock with passkey on start (secure your data from recovery intruders)

- fix segfault during shell nandroid backup/restore commands

- enable progress display during "adb shell nandroid backup/restore" commands

- enhance and fix bugs of progress display during install/nandroid... operations

- nandroid restore: fix progress bar animation when md5 verify is enabled

- nandroid md5: fix progress bar was not reset for each file

- nandroid md5: fix .android_secure md5 sum was never generated or checked

this could cause md5 check to fail under some circumstances

- limit logging to console in adb shell nandroid and mount commands

- fix detection of real fstype (pointer to in the scope char array bug)

- disable useless sd-ext warnings and errors

Changes between 6.43.6 and 6.30.1

See recommendations at the bottom of this post for details on F2FS...

- f2fs: recreate /etc/fstab after ext4/f2fs conversion for proper use of system mount command

- f2fs: fix nandroid restore to f2fs partitions

- f2fs: support format extra storage to f2fs (vold patch needed)

- f2fs: support switching between f2fs/ext4 (needs f2fs in kernel modules), thanks [MENTION=2072381]KumaJay[/MENTION]a

- f2fs: reload volume table after f2fs/ext4 conversion (no reboot needed after conversion)

- f2fs: do not format whole /data when not expected on /data/media devices

- f2fs: allow /data f2fs/ext4 conversion for non data_media devices

- f2fs: compile with prebuilt AOSP kernel as provided by [MENTION=5499742]dennes544[/MENTION] - thanks!!!

- allow ext4 f2fs backup data migration in nandroid

- create /data/media/0 after formsat of /data and /data/media

- nandroid backup: fix 'media' exception

- use libtar as default for backup/restore

- Preserve recovery settings after a wipe

- fix save/restore settings menu label

- create /data/media directory after internal storage is wiped

- fix text print colour could persist after md5 check

Bug Fix version 6.30.1

- fix restore of /data: revert to busybox tar and external selinux backup

Changes between 6.26.6 and 6.29.2

- fix potential bug when verifying root and recovery state on exit

- merge "Fix verify_root_and_recovery menu selections

- hide the Go Back button from confirm menu

- add minitar binary to /sbin instead of busybox tar

- minitar: enable more options, enable long options, fix selinux backup/restore, enhance GNU tar compatibility

- enable seamless backup/restore selinux context using minitar binary

- TWRP mode: support backup/restore of selinux context

- confirm cancel nandroid jobs (prompt to press 'Back' twice or resume after 5 secs)

- vibrate after backup/restore operations

- do not consider su symlink in /system/bin as a broken root

Changes between 6.26.1 and 6.26.6

- CWM 6.0.4.8 rebase

- Fixed rootsu error in fstab

- Removed /efs1 and /efs2 from mounts and storage menu

Changes between 6.23.9 and 6.26.1

- fb2png: better error logging

- sort files using case insensitive order

- remove old no more needed md5 check code

- fix successive gestures

- set these default gesture actions:

* swipe left = screen off

* swipe right = increase brightness

* press 1 sec and lift = show log

* press 2 sec and small move = screen shot

- merge "Only init legacy property environment once"

- revert using ntfs module and drop to fuse for complete write support

- use new md5digest code to generate/verify nandroid backups

- bring progress bar during nandroid md5 generation and check

- exclude log and md5 file when regenerating md5 files

- twrp mode: use new md5digest function with status bar during md5 check/create

- twrp mode: fix double md5 verification bug

- fix delete backup menu failed to reopen base backup folder + wired log message

- fix the "umount: can't umount /data: Invalid argument" log message on start when time daemon was loaded

- show "time daemon loading" message on recovery start when we're waiting for the daemon to load

Changes between 6.23.7 and 6.23.9

- Updated time daemon settings to use hammerhead default dir /data/system/time. Time now works (except Daylight Savings - Change Time zone manually for now to get correct time)

Changes between 6.22.7 and 6.23.7

- Better error checking to avoid segfaulting

- really hammer lazy developers (report outdated binary in ui print)

- Use legacy property environment if old update-binary

- fix fb2png flag to be enabled by default

- fix potential unsafe thread code

- Disable gesture actions during md5 checks as they are not thread safe

Changes between 6.21.2 and 6.22.7

-Qualcomm screenshot (fb2png) functionality added

- USB OTG install zip (black screen) Bug fixed

Changes between 6.20.6 and 6.21.2

- add progress bar while reading zip file to compute md5 check

- add color printing during md5sum checks

- (derp) fix color code printing on md5 check disappears after 5 sec (ui_wait_key() screen refresh)

- md5sum check potential bug fixes and optimizations

- libtouch_gui 1.05

Changes between 6.19.7 and 6.20.6

- add md5 sum calculation and toggle verification during install of zip files

- many bug fixes and code cleanups

- libtouch_gui 1.04

Changes between 6.19.3 and 6.19.7

- add /efs backup support*

Note, efs is split over 2 partitions on the N5. Back them both up in custom backup! DO NOT RESTORE EFS BACKUPS ON ANOTHER PHONE!

Changes between 6.15.4 and 6.19.3

- merge "update-binary: Add collect_backup_data function"

- merge "recovery: add overlay interface for recovery mode"

- merge Aroma patches:

- User selectable colorspace added to settings.

- Unmount /system at exit if mounted.

- Some more logging added

- merge remote cm-11.0 changes

- led state in menu

- more comprehensive menu text display for /data/media/0 toggle

- fix potential memory leak in /data/media/0 toggle

- huge cleanup and potential bug fixes

Changes between 6.12.9 and 6.15.4

- update superSU to 1.93

- sync sources

- fix recovery reboot command (adb and shell) by adding the init sys.powerctl property control

- merge "Fix mkfs.f2fs calling in roots"

- fix display current path when navigating backward in folders

- Nandroid Simple Logging: toggle logging of file names during nandroid to keep screen progress while speed up nandroid operations for some devices

- increase NICE_INTERVAL to 300 msec (faster backup/restore on some devices)

- hide unused settings in Nandroid Settings menu (if we disable all progress on screen, hide non valid options)

- re-order nandroid settings menu

- add a toggle for fall back to pre-built update-binary to permit use of older update-binary in zip packages (doesn't persist on reboot).

this will fix the assert errors due to outdate update-binary. It could still be affected by assert error on device name getprop. However, that one is easier to fix by end users by editing updater-script. This is a workaround. The best is to hammer your ROM cooker to update his scripts and binaries

- setting for signature check toggle on zip updates will be now saved on reboot

- Aroma File Manager: mount vold managed volumes on launch from recovery

- Free Browse Mode: make it possible to install from any custom path even ramdisk

- Free browse mode: fix exceptions when setting up custom path

- Free browse mode: mount known volumes during setup

- Free browse mode: better handling of /data/media devices

Changes between 6.12.8 and 6.12.9

- Update to Stock KOT49H kernel to fix Graphical glitches caused by CM 11 kernel

Changes between 6.09.2 and 6.12.8

- time and date menu text formatting and order

- version display edit

- add ntfs write support to devices using kernel modules instead of fuse

- zip installer: update loki binaries for LOKI devices

- zip installer: use new update-binary sources

- manually set time and date in recovery

- support Qualcom time daemon to sync time with main system (credits to dougiebee)

- support RTC offset hack for Qualcom devices without a proper time daemon in system ROM (credits to dougiebee)

- option to drop to system set time and date commands (credits to dougiebee)

- set default nandroid compression level back to low

- roll out exfat-nofuse sources from dorimanx into various kernels from Samsung and other brands

- code fix and cleanup

- update SuperSU to 1.91

- merge android_system_core changes to adb to fix push to extra storage paths

- do not use performance mode during install zip: fixes hang on unmount /system in updater-script when usb cable is connected

- update to CWM 6.0.4.7

- merge "Fix up bu restore"

- ROM Manager: workaround to backup/restore to/from external storage

- enhance touch init (fix touch on some Sony devices)

- really fix reading device max brightness value

- loki: merge "Support Open EU LG Optimus F6 and US Cellular Optimus F7"

- read the device max brightness setting to fix brightness toggle on some Sony devices

- merge: "Populate mount menu with new mount/format matrix" - final version

- merge: "Use cat for adb backup."

- merge: "Populate mount menu with new mount/format matrix"

- do not error on missing sd-ext when wiping dalvik cache

- merge: "su: Update for latest su daemon compatibility"

- merge "Clean up c formatting - 1"

- merge "Remove "Go Back" option from verify root and recovery options"

- merge "Fix potential chmod failures"

- merge: "Add a copy of the updater binary to the recovery resources"

- merge: "install: Support downgrade scenarios"

- merge: "install: Fix possible overflow condition in the updater "scanner""

- merge: "minui: do not use flexible array initialization"

Changes between 6.07.9 and 6.09.2

- TWRP: merge "support use TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID"

- toggle prompt on low free space during backup

- SuperSU update to v1.89

- loki: merge "Support LG Vu 3."

- code cleanup

- gesture action defaults changed

- long press and lift gesture action is now triggered after finger pressed for more than 1 sec

- do not include fb2png on non supported devices

- stop always rebuilding aroma intermediates

Changes between 6.03.5 and 6.07.9

- fix exiting "pause on logs" mode with virtual keys caused erroneous validation

- fix exiting screen off mode with hardware key could cause erroneous validations

- fix some devices could not exit "pause on logs" mode with screen touch

- bring immediate touch responsiveness after exiting screen off mode and "pause on logs" mode

- fix erroneous first menu validation when exiting screen off mode on some devices

- fix long press and move action could be triggered while swiping outside menus and returning to first touched area

- increase threshold for long press and move action for easier triggering

- small touch scroll optimizations

- improve touch responsiveness on low res devices

- code clean-up and optimization

- fix log text could overwrite clock/battery icons on some low res devices

- after successful zip install with sideload, hide the install background icon

- after installing zip with sideload, do not trigger "pause on logs" mode

- loki: sync latest sources (support LG G2 VS98012b)

- better fit text logs on non HD devices: stop slightly overwrite of bottom virtual keys separation bar and clock/battery area

- fix logs overwriting bottom virtual keys and progress bar in sideload mode

- add 5 extra partitions support in nandroid: can be added in fstab and will be auto detected

- custom backup and restore menu: move reboot item to top of partitions list

- custom backup and restore menu: auto hide all unused items

- advanced menu: hide /data/media toggle for non datamedia devices

- sync loki sources: add new LG devices

- SuperSU update to 1.86

- busybox: merge [MENTION=3084245]Chenglu[/MENTION] changes to support selinux (no tar --selinux yet)

- huge code clean ups and fixed

- fix twrp backup/restore default mode

- save loki support user setting (default is now disabled)

- add custom backup and restore options to main nandroid menu for each storage volume

- ditch stock cwm limited advanced restore function

- add toggle to switch between TWRP/CWM as default backup mode

- ors: backup mode is now the default backup mode set for all recovery session

- ors: smart restore mode to override main backup mode depending on path we restore from (TWRP vs CWM auto detection)

- backup/restore validation menu moved to top in custom modes

- sanitize rom name for backup: exclude "&" symbol and fix compiler warnings (size_t)

- when deleting backups, do not exit the menu each time

- fix new line in process_volumes()

- merge: "Don't return immediately from reboot commands."

- merge: "Enable incremental builder to find files that moved"

- merge: "Support recoveries without CONFIG_EXT4_FS_XATTR"

Recommendations

Recovery Lock / Passkey

[MENTION=4666971]Phil3759[/MENTION] has implemented a recovery lock with pass key. This means that you can lock your recovery. Providing you keep your bootloader locked and keep an Android ROM Pattern, PIN, Password lockscreen, this will mean that a "recovery intruder" will not be able to use or replace recovery without unlocking yuour bootloader using fastboot (Which wipes the device). Thieves will no longer be able to look through your photos or find files related to banking on your device.

The Lock comes up at recovery boot. There is no GUI or adb access available until the recovery is unlocked. Please note, this is designed to prevent people getting hold of your data, NOT to prevent them wiping your data. If you decided to use this option, you must ensure that you keep your data backed up on an external device. This recovery is not responsible for data wipe prevention or if you somehow manage to lose access to recovery.

To setup the passkey:

Go into Recovery > Philz settings

Setup recovery lock

Change recovery passkey

You will be prompted to set and confirm your passkey. Passkey is a 6 "character" combination of hardware key presses (Vol up, down and power).

Please note, flashing a ROM will remove the passkey, so you will have to set it up again. Passkey is stored in /system/.recovery_key.lok

F2FS

What is it? - Flash-Friendly File System. designed by Samsung to be used spcifically on Flash media. Can increase Read / write speeds, increasing the overall performance of your phone.

Where to use it? - Since not many read / writes happen anywhere except /data, it's best to use it only on the /data partition (including /sdcard)

Do I need anything special? - Yes, you need an F2FS supported kernel

Can you recommend an AOSP Kernel? - Yes, use the AOSP/CAF kernels created by [MENTION=5499742]dennes544[/MENTION] here. If you need something a bit more custom, flash ElementalX afterwards

Any other kernels that work? - I can't say I have tested them all. So far, I haven't managed to get Faux to work. I have used a custom version of Franco however and that worked fine (see link in thread above). I'm not really here to recommend / catalogue kernels though

Any further advice? - It depends on the kernel if it supports other partitions to be formatted as f2fs. For example, some may not allow /system to be formatted as f2fs - but this is not much use anyway, o please stick to just /data and /sdcard

Do I need to keep swapping between F2FS Philz and Standard Philz? - No, it is all one kernel. No need to flash different ones.

How do I use this? - See below

Here are the steps:

- Ensure you have an F2FS kernel (put it on your sdcard now) or have the .img ready on your computer

- Take a full Nandroid backup

- backup your ENTIRE /sdcard to PC (adb pull is as good as the rest - and also a good test that you know what you're doing)

- Flash the updated recovery

- Go to "mounts and storage"

- Press "toggle f2fs ext4 migration"

- Press "format /data and /data/media (/sdcard)"

- Select f2fs and "Yes" - Your /data and /sdcard are now blank

- adb push your clockworkmod folder back to /sdcard (and f2fs kernel if you're using a zip)

- Nandroid restore your /data partition

- Flash your F2FS kernel

- Copy sdcard data back, (using MTP in Android is best) - You may need to boot into Android and reboot the device again before Internal storage shows (Linux only perhaps?)

Notes:

Please note, the migration toggle is disabled again as soon as you leave that menu. The format options will format to whatever each partition is already formatted to whilst the toggle is disabled. So if you previously formatted to f2fs and then reboot recovery and format again, it will continue to format to f2fs until you enable migration and choose the opposite option (ext4).

Also, whilst migration is enabled, you willbe prompted which fs to format to; ext4 formats to ext4, f2fs to f2sf and default to whatever it is already formatted to.

Recommended time settings

Philz Settings > GUI Pref > Time Set up > change date and time

Use the "Time daemon" setting. Set this then boot into rom. Give it a couple of minutes and boot back into recovery.

Please note, qualcomm time daemon always uses UTC (GMT) so you must manually set your time zone in recovery.

Daylight saving is not yet managed by recovery so please alter time zone manually to compensate.

EFS Backup

In custom backup settings, select efs 1 AND efs 2. The N5 splits over both.

Do NOT restore efs on another phone. EFS must be unique on every handset. Restoring efs from another phone will ruin your phone.

md5 verification

If you're moving zips on and off your phone all the time, they can become corrupt during any one of those moves. The new Md5 functionality allows the md5 to be calculated before flashing a zip and shows you on the recovery screen. This means you can read the screen and compare it to a known md5sum for the zip.

There is additionally an md5 verification setting that will only flash the zip if it matches the md5 stored in an md5 file on your memory. I wrote a script to put in the directory with all your zips on your phone that will create an md5 file for you for each zip you have. This way, as you move your zips on and off your memory, you can take the md5 file too and have Philz prevent flashing of those zips if they become corrupt.

Simply unzip the attachment into the directory where you keep all your zips. In terminal emulator, cd to that directory then run the sh file. In this example, all my zips are in /sdcard/AFlash

cd /sdcard/AFlash
sh md5.sh

Enjoy