TWRP 3.2.1 for H901 - T-Mobile LG V10 Android Development

The following is the latest version of TWRP compiled for the T-mobile V10 Model H901.
https://androidfilehost.com/?fid=818070582850501883
MD5SUM: b89d341cd61da31a5348d8f6b3c75c97
The heavy lifting was done by the twrpbuilder project who were generous enough to compile TWRP for our device. They also provide their services to see TWRP is available for devices that don't yet have it. I've personally used this version to do a backup and restore but can't guarantee there won't be issues. If there are while you are still in twrp you should go to the advanced section and copy the log to your external sd card. This log will help them diagnose any issues.
The project is located at: https://twrpbuilder.github.io
Their XDA thread is located here: https://forum.xda-developers.com/android/apps-games/twrpbuilder-t3744253
If you already have TWRP installed installation is as follows: Click Install, choose Image file, navigate to where the TWRP img file is located on your external sdcard and flash that img to the recovery partition. Back out to the root dir and you can select reboot then recovery...it should bounce you right back into recovery and you should see the new version loaded. If you have root in the rom and run into issues the app "flashify" can reflash TWRP 3.0 so make sure you also have it's img available.
This is pretty much only for folks who already have twrp to update to the latest. If you are on nougat you are still stuck until an exploit is released that works for nougat the way dirtycow did for marshmallow and below. *update* an exploit to give root to nougat users is now available thanks to @runningnak3d here: https://forum.xda-developers.com/tmobile-lg-v10/general/root-h901-nougat-t3773942

Reserved Post #1

Reserved Post #2

famewolf said:
The following is the latest version of TWRP compiled for the T-mobile V10 Model H901.
https://www.androidfilehost.com/?fid=8180705828505018
MD5SUM: b89d341cd61da31a5348d8f6b3c75c97
Click to expand...
Click to collapse
Looks to me like that URL should read
https://androidfilehost.com/?fid=818070582850501883
[ EDIT ] Yup, confirmed.. The URL I listed works fine.
Thanks for the file!
:laugh::silly:

NYLimited said:
Looks to me like that URL should read
https://androidfilehost.com/?fid=818070582850501883
[ EDIT ] Yup, confirmed.. The URL I listed works fine.
Thanks for the file!
:laugh::silly:
Click to expand...
Click to collapse
You are correct. For some reason a few characters got truncated. I've corrected the url in post #1.

famewolf said:
The following is the latest version of TWRP compiled for the T-mobile V10 Model H901.
https://androidfilehost.com/?fid=818070582850501883
MD5SUM: b89d341cd61da31a5348d8f6b3c75c97
The heavy lifting was done by the twrpbuilder project who were generous enough to compile TWRP for our device. They also provide their services to see TWRP is available for devices that don't yet have it.
Click to expand...
Click to collapse
Just as an aside, this version seems to correct (mostly) the date issue of previous TWRP versions for the V10. Versions before this one used to generate a default date (folder name) for the backup dating back to the 1970s as I recall.
This one has the correct month and day and time and the year is only 1 off - it showed 2017 on my very quick attempt to play with it.
One additional note to those installing it via TWRP itself - after selecting image flash , MAKE SURE you specify RECOVERY partition, not BOOT! Specifying BOOT will most likely have some less than desirable results.. :laugh:

NYLimited said:
Just as an aside, this version seems to correct (mostly) the date issue of previous TWRP versions for the V10. Versions before this one used to generate a default date (folder name) for the backup dating back to the 1970s as I recall.
This one has the correct month and day and time and the year is only 1 off - it showed 2017 on my very quick attempt to play with it.
One additional note to those installing it via TWRP itself - after selecting image flash , MAKE SURE you specify RECOVERY partition, not BOOT! Specifying BOOT will most likely have some less than desirable results.. :laugh:
Click to expand...
Click to collapse
I've passed on the date issue. Uncertain if he'll generate another build though.

famewolf said:
I've passed on the date issue. Uncertain if he'll generate another build though.
Click to expand...
Click to collapse
Seems that either nobody is using this version or nobody knows about it or they just have nothing to say..
Anyway, as you know, I have spent a fair amount of time recently working with this and installing it. A couple of observations that may be worth noting..
I double checked and I did set a screen timeout on TWRP. Previous versions would first, dim the screen, followed by turning it off completely. If you had the device near you on a desk while backing up the screen lighting up again when TWRP completed was a sure signal that it was finished.
This version of TWRP dims the screen but the screen is never turned off completely. A minor annoyance I suppose but something is different from previous versions.
During the /data partition backup I noted a (to me) new display in yellow: "Backups of data do not include any files in internal storage such as pictures or downloads"
Seriously? Is this something new? Certainly the display is but I always kinda relied on all that being backed up with /data and having the ability to restore them. This is a more serious issue for me which may make me consider going backward..
Thoughts?

NYLimited said:
Seems that either nobody is using this version or nobody knows about it or they just have nothing to say..
Anyway, as you know, I have spent a fair amount of time recently working with this and installing it. A couple of observations that may be worth noting..
I double checked and I did set a screen timeout on TWRP. Previous versions would first, dim the screen, followed by turning it off completely. If you had the device near you on a desk while backing up the screen lighting up again when TWRP completed was a sure signal that it was finished.
This version of TWRP dims the screen but the screen is never turned off completely. A minor annoyance I suppose but something is different from previous versions.
During the /data partition backup I noted a (to me) new display in yellow: "Backups of data do not include any files in internal storage such as pictures or downloads"
Seriously? Is this something new? Certainly the display is but I always kinda relied on all that being backed up with /data and having the ability to restore them. This is a more serious issue for me which may make me consider going backward..
Thoughts?
Click to expand...
Click to collapse
I use my v10 as my backup phone now. On my HTC U11 life when I make a nandroid it shows that it is not backing up files on internal storage. I think this is normal now on the latest version of twrp.

NYLimited said:
Seems that either nobody is using this version or nobody knows about it or they just have nothing to say..
Anyway, as you know, I have spent a fair amount of time recently working with this and installing it. A couple of observations that may be worth noting..
I double checked and I did set a screen timeout on TWRP. Previous versions would first, dim the screen, followed by turning it off completely. If you had the device near you on a desk while backing up the screen lighting up again when TWRP completed was a sure signal that it was finished.
This version of TWRP dims the screen but the screen is never turned off completely. A minor annoyance I suppose but something is different from previous versions.
During the /data partition backup I noted a (to me) new display in yellow: "Backups of data do not include any files in internal storage such as pictures or downloads"
Seriously? Is this something new? Certainly the display is but I always kinda relied on all that being backed up with /data and having the ability to restore them. This is a more serious issue for me which may make me consider going backward..
Thoughts?
Click to expand...
Click to collapse
On your last issue this is business as usual...twrp has NEVER backed up the internal SDCARD unless you selected the sdcard entry in the list of sections to be backed up. DCIM (pictures) and the Downloads folder/dir have never been included.
As to the dimming, you can check in settings to see if something can be configured however each person compiling twrp can set their own options as to how they want it to function. There is no guarantee or expectation that Person B is going to use the same options as Person A. You are of course free to compile your own copy configured the way you would prefer it to behave but the process was enough of a pain in the butt I just requested twrpbuilder to generate one as I kept getting errors. The process to compile it also appears poorly documented.

sabresfan said:
I use my v10 as my backup phone now. On my HTC U11 life when I make a nandroid it shows that it is not backing up files on internal storage. I think this is normal now on the latest version of twrp.
Click to expand...
Click to collapse
I kinda suspected that but that is, at best, a questionable choice since I don't even have the option to check or uncheck a selection for it. Not happy..
famewolf said:
On your last issue this is business as usual...twrp has NEVER backed up the internal SDCARD unless you selected the sdcard entry in the list of sections to be backed up. DCIM (pictures) and the Downloads folder/dir have never been included.
Click to expand...
Click to collapse
Not quite. INTERNAL is not the SD Card. Internal is emulated sd on /0. In TWRP if you tap select storage, for example, you can pick "internal" or "SD" for backup destination, as one example.
I keep a fair number of things in /Download - things I grab in my travels, things I save there for later use.. whatever. I'll have to device a Tasker module or something for copying all those to the actual SD card...

NYLimited said:
I kinda suspected that but that is, at best, a questionable choice since I don't even have the option to check or uncheck a selection for it. Not happy..
Not quite. INTERNAL is not the SD Card. Internal is emulated sd on /0. In TWRP if you tap select storage, for example, you can pick "internal" or "SD" for backup destination, as one example.
I keep a fair number of things in /Download - things I grab in my travels, things I save there for later use.. whatever. I'll have to device a Tasker module or something for copying all those to the actual SD card...
Click to expand...
Click to collapse
A fairly recent app/utility created by @kdrag0n called Tipatch brings a long-needed resolution to the table regarding "full backups" of Data using TWRP. In a nutshell, Tipatch installs to your Android device as a basic APK. Within the simple GUI, once root permissions are granted (In-Place Patching) Tipatch will decompile, patch, recompile and flash the patched TWRP to /recovery, effectively patching your TWRP build to backup the contents of Internal Storage (emulated SD card) as part of Data itself, so that backups will now include those Internal Storage contents such as downloads, photos, videos, game data, and other various files. I've tried it on this particular build of TWRP and it works without any issues. There are options to patch TWRP without root permissions as well. There are Windows, Mac & Linux versions available too. If you are patching TWRP on a device with an A/B partitioning scheme, the patched TWRP can be installed on both A & B using a one-click option. Of course, one insurmountable caveat to patching TWRP with Tipatch is that wiping Data now will also wipe Internal Storage (emulated SD card). In short, the utility works on pretty well all device types and chipset platforms (Exynos, Kirin, Snapdragon, MediaTek, etc.). The latest Tipatch update, v1.6, includes support for TWRP builds that use LZMA compression, and removes the now-misleading notification previously listed when backing up Data -- that Internal Storage (/data/media/ path / emulated SD card) contents are not backed up. Anyway guys, here is a link to the Tipatch Discussion & Support thread: https://forum.xda-developers.com/android/apps-games/app-twrp-tipatch-backup-internal-t3831217
The latest Tipatch v1.6 app is also available on the Play Store and many other app & apk repos for Android. Versions for Windows, Mac and Linux can be downloaded using the above link.

Related

Nandroid and Restores

Hi Guys,
I recently bought my Nexus one this past weekend. I'm coming from a Windows Mobile fan(boy) perspective of many years. Not the hugest linux fan, but at least the base level of Android control is a menu and not "dev cmd etc" command line stuff
I like the Nexus one so far. I tried CompanionLink/gSyncit/Nitrodesk Touchdown/Android-sync(Alpha)/Remember The Milk etc, and they all don't sync Outlook very well..so I'm happy to keep my Winmo phone for its use for that, which is excellent and easier to type imho for that kind of stuff within a windows environment. Kind of like a Palm pilot.
As for Apple. I'm proud to say I've never touched one for years, until yesterday. I *had* to get my father a slidey smartphone as a gift, because they're awesome to see and navigate. Since he's not a big data guy I couldn't justify a nexus one, so a used iphone 3G fit the bill.
Hope i don't have to touch it too much tho!
Anyways, I thought I'd give you guys some history on where I'm coming from as an introduction and seeing as I havent posted on here in a few years.
So..regarding my questions:
*Nandroid backups Question
- A nandroid-ext backup will not occur, and will display the ADB Error if you don't actually have an extended partition on your SD Card, correct?
I was trying to do an Nandroid+ext backup, because noobishly i thought it just meant it would backup everything. It didn't work, and neither did the "plug it in the charger tricks" etc, or check if you have enough sd space. So I figured it was because i didnt actually have an extended SD partition. Stock 4gig micro SD btw.
A NAND backup worked after that.
- How do I check if my SD card has an extended partition btw?
*Sdcard/Nandroid folder Question
Are nandroid backups saved here in a chronological order?
Meaning
/first directory asfldkjsdafjs/
/second directory aslkdfjljds/
First is my stock rom backup?
Second is my Cyanogen backup?
Say I do a third backup (it appears third right)? Will it be my Cyanogen backup *plus* all my added stuff I've done since then? Like widgets, contacts, email account setups?
*ROM Recovery
- So as a noob I'd like to play around a bit. But I'd also like to populate my phone with backgrounds (sd card), contacts, ringtones (sd card), Apps (sd and main mem) etc.
Say I want to move from my current rom (cyanogen 6) to say MUIMUI (sp?) in a week. When I goto Bootloader recovery and select the Muigungui.zip, will it still keep the phone "mine" on restore?
Thanks a lot for your help guys! I hope to join the Nexus One discussions now too after this my first post!
Your Nandroid backups are named by date and time of your backup.
Every backup you make, backups ALL user-accessible partitions on the phone. That includes pretty much EVERYTHING, both system (ROM) and data (everything else). All the rest of your questions have answers logically derived from this statement, please use the required logic.
Your SD card doesn't have anything unless you made it - which is obviously not the case, or previous owner made it - which is also obviously not the case, since you had stock ROM.
Thank you Jack.
I understand better now.
On looking at my sd folder structure, I see:
sdcard/HT096P800012/BCDES-date-4 numbers
Does the HT096P800012 subfolder stay the same, or does nandroid add more HT subfolders in time. (just a curiousity question)
In the 4 numbers part, if I did two backups on 201001103, does the higher number indicate the most latest backup by the logic you describe?
also, some backup folders have nandroid.md5 as a file and some don't. What is that?
Nerdy questions I know. I do thank you for your help?
(PS: If I update my radio with a new one, that doesn't affect my phone proper right?)
The upper folder stays the same - it's the name of your device.
4 numbers are hours and minutes
nandroid.md5 is MD5 sum of the backup, for verification. Not needed for restoring, AFAIK.
Radio doesn't affect your phone in any bad way, as long as it's compatible with your OS (radios for Eclair were different from radios for Froyo), and as long as you're flashing it correctly, without removing the power from the phone when it's in process of flashing.
Thank you so much!

[FIX]Enable encryption - Check&Shrink ext4 filesystem

If you ever used CWM, CWMT or other non factory recoveries to wipe your data, you probably noticed that you lost the ability to encrypt your phone. Or maybe you did not even realize this is why encryption does not work.
For the Android phone encryption to work, it needs the /data (usrdata) partition to have a little bit of unused space between the end of the filesystem and the end of the partition. And as soon as you use CWM to wipe, it actually reformats using all space, and encryption does not work anymore.
User lolo250612 brought this to my attention, and together we created a update.zip that shrinks the /data filesystem by 1MB
In fact, we created 2 patches: One to shrink, and one to first repair the filesystem. The first will refuse to shrink if the file system is not clean and healthy. They will automatically find the correct usrdata partition device and its size. The shrink will then resize to 1MB less then the partition size (which means it could also be used to grow if you somehow had a filesystem a lot smaller, for example because you restored an smaller image from somewhere).
Both patches are created with statically linked e2fsprogs binaries and its own static copy of busybox shell interpreter. So they should work on all Android devices that use ext file system (probably all V2.3.1 Gingerbread and higher androids), and you should not lose any data because of this. But it is always good to make a backup.
We tested this on 2 phones, both ICS phones, and with both CWM and TWRP type recoveries, and are fairly certain it is safe to use. But to repeat, you should always take a backup of your phone.
Both patches can be found on my shared drive:
ICS_usrdata_fix-fs.zip
ICS_usrdata_shrink.zip
Procedure:
- Make backup of your phone
- Place files on SD card
- Boot into recovery
- Apply the shrink update
- If it tells you the filesystem is damaged apply the fix-fs update first
The patch only shrinks the filesystem, nothing is actually installed or removed on the phone. But if you use encryption, you could leave this patch on your SD card so that every time you wipe data, you can run the shrink patch again afterward to enable encryption again.
If you do use this, please report back in this thread, possibly mentioning your phone model and ROM you are using.
Quick encryption guide (and more)
I won't go deep into useless details as everything has already been described about Android phone protection somewhere on the internet. I will just give some meaningful links and tips by illustrating how I have protected my phone. Really nothing new or innovative, just a compilation of a few hints that I have put in practice to protect the numerous pieces of information that are on my phone.
Step 0: awareness
----------------------------
Why bother with phone security?
In short, I am clearly paranoid. Well, in fact, I don’t really feel at ease when I know all the information, both personal and professional I have on my phone. Over the month, my Androphone has become a real digital Swiss-knife and personal secretary. This includes:
Personal and professional contacts
Personal and professional agendas
Personal and professional digital exchanges (SMS and email)
Personal and professional photos
Banking account information
Trails where I run
Etc… etc…
Don't want someone looks at them. Not you?
Fist step: on-line protection
----------------------------------------
The first step in protecting your data consists in making hard to access indirectly the data that lay on your phone memory. This access consists in using the system when the phone is on, either via the GUI and the phone controls, or remotely (essentially by network connections, or phone basic functionalities like sms). So, basically, you need to lock efficiently your phone from preventing someone else to unlock the user interface that allows interactions with the system, and protect all communication channels.
To lock efficiently your phone, you must use a pin code of at least 4 digits (6 is better) or a pass-phrase. The latter is much less practical without improving online security that much. Above all, you must avoid those silly locking solutions like face recognition unlocking, or pattern lock. Those are toys for naive young boys. Not for those concerned seriously by security.
For protecting remote access to your phone, I would suggest:
1) Double check that USB debugging is disabled. This a major security hole.
2) Turn on data connections (bluetooth, wifi and 2/G/3G/4G) only when required (email checking, web-surfing session, data synchronising), and off rest of the time.
3) Avoid install cracked unofficial apks, or applications that asks for permission far beyond their obvious and principal utility
4) Install a software security app, if possible, open source and recognised by xda members. Once an adept of Droiwall, I have switched to Avast mobile security because of its extra features. But it is not opensource and it is a question of taste. But do this carefully, see that for instance before making a choice: http://download.cnet.com/8301-2007_4-57391170-12/dont-get-faked-by-android-antivirus-apps/ and http://www.av-test.org/fileadmin/pdf/avtest_2012-02_android_anti-malware_report_english.pdf.
But, you must be rooted (which is in itself a security hole if not mastered) and one must have a kernel with netfilter functionalities activated. This is the case with the stock kernel of the phone I use at the present time (Lenovo A789). But was not the case of 2 Samsung phones I used before. You have to either install a custom kernel adapted to your phone, or make your own if you have access to its sources (see tutorials as: http://forum.xda-developers.com/showpost.php?p=22941057&postcount=1)
5) Personally, I would feel more at ease if I could find an easy to use firewall solution that could close, and better, make stealth all the local ports of my phone, especially when I am not behind a wifi router. But I haven’t found one yet. Droidwall, nor Avast, addresses this functionality, whereas it would be fairly easy to implement it with the netfilter system layer underneath.
Second step: offline protection
-------------------------------------------
Here we are. Now your phone is protected when it is on. But, what if you switch it off, or remove its sdcard? The data lay on the internal memory, unprotected (at best obfuscated). Really easy to find a custom recovery for almost all phones, write a script to dump /data on a sdcard and then make whatever you want with the copy.
Don’t like that? The only solution to prevent /data from being read by someone else is to encrypt the /data partition. To do that, your phone or tablet internal storage partitions must be seen by your system as block devices. This is the case with eMMC but not with Yaffs. So beware, if you want encryption you need to buy a device that answers this requirement. This is not always true and almost never documented. Notes on the implementation of Android encryption are there: http://source.android.com/tech/encryption/android_crypto_implementation.html
Now, as me, if you are reading these lines, you are certainly looking for extra information about your Android device and probably extra functionalities.
Certainly, the most frequent way to install extra functionalities and custom ROMs to your phone is to use an update zip file. With stock recovery, this zip file needs to be signed, otherwise it is rejected. For maximum flexibility and ease of use, alternative boot recovery have been developed, of which CWRP is certainly the most famous.
Usually, for 99% of users and operations, CWRP operates great. Sometimes, as nothing is perfect, a bug may occur. This is the case for built in ICS encryption process. As Cybermaus indicates in the first post, to be able to perform this encryption the /data filesystem must be slightly smaller than the underlying partition. But CWRP, at least up to the version 5.5, formats all the corresponding partition leaving no place for Android to store the required information to be able to start the encryption process. This is clearly described in the following links: http://forum.xda-developers.com/showthread.php?t=1792101 and http://rootzwiki.com/topic/25652-fixing-galaxy-tab-2-encryption/
I have discovered that by using aLogcat to track down the origin of the failure. The interesting part revealed to be: E/Cryptfs ( 87): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
To circumvent this problem, you will find in Cybermaus first post, two CWM update zip files that will do the trick in a simple and secure way. After flashing your ROM and wiping data with CWM, apply them, go to system encryption as described here:http://support.google.com/android/bin/answer.py?hl=en&answer=1663755, and after waiting one or two minutes (not more), the system should restart automagically to encrypt your /data partition.
Third step: making your phone even more secure and practical at the same time
-------------------------------------------------------------------------------------------------------------------
Android built-in encryption is in fact more or less Linux LUKS (http://en.wikipedia.org/wiki/Linux_Unified_Key_Setup). Plus, it is open-source so that everyone with the required skills can make an audit of the code to see if no security hole is present in the Android implementation. The underlying mechanism is strong and secure, as long as you use a strong password. I mean by strong, at least 12 characters that includes at the same time lower-case letters, upper-case letters, numbers and symbols. And it must be something impossible to guess for others while easy to remember for yourself. You will find a lot of resources on the internet on how to create such a password. For instance: https://help.ubuntu.com/community/StrongPasswords .
The problem with Android, in its attempt to keep the system not too complicated to use, is that the GUI (I insist: only the GUI, not the system) does not distinguish between the PIN or passphrase that you use to lock your phone when it is on, and the password used to encrypt the data that lay physically on your phone storage. So the casual user is in front of a paradigm: either he chooses a strong password for its data, but this will rapidly become tedious to type at least 12 characters to unlock his device several times a day; or he decides to use a PIN code, which is more practical to unlock the phone, and consequently uses a really weak password to encrypt its data which contains only digits, and thus may be cracked in a breath by any PC.
Fortunately, this paradigm is addressed and solved by small tools like EncPassChanger or Cryptfs Password (both requiring that your phone be rooted, which is by the way, paradoxically, a security hole if not used with caution ). See: http://nelenkov.blogspot.fr/2012/08/changing-androids-disk-encryption.html for complete notes about that. So for me, the only way, both secure and practical, to secure your phone is by using a PIN code of at least 4 numbers (6 is better). Then use a handy tool like EncPassChanger to have a true complex password for decryption at boot time.
Fourth step: increase security, without sacrifying practicability
-----------------------------------------------------------------------------------------
As I am paranoid, but at the same time don’t want my phone to become a source of annoyances, the previous “basic” steps were not enough for me.
So I decided to improve security in two ways:
1) By following the following tip, which I find great and is itself self-explaining: http://forum.xda-developers.com/showpost.php?p=26730989&postcount=2
2) By encrypting the photos I take with my phone, because these are linked with my private life and I won’t like that somebody gain access to them.
3) By encrypting documents I scan with CamScanner, for home and work, which may be sensitive.
4) By automating the action that disables USB debugging in case I forget to put it off after using it .
For point 2 and 3, documents lay on your sd card uncrypted. Android built-in encryption does not deal with both internal and external sdcard (just to be clear, by sdcards I mean partitions mounted as /mnt/scard or /mnt/scard2). To encrypt them you have to use once again an external tool. As I am an opensource fanatic for all that deal with security, I would recommend to use LUKS Manager (https://play.google.com/store/apps/details?id=com.nemesis2.luksmanager&feature=search_result and http://forum.xda-developers.com/showthread.php?t=1141467) which is based on dm-crypt module (yes, the same that Android uses for its build-in encryption), or Cryptonite (https://play.google.com/store/apps/details?id=csh.cryptonite&feature=search_result) which is completely open-source and implements the rock-solid Linux encfs on Android.
The latter is my personal choice. I do not use Crytonite in itself, except for creating the initial .encfs6.xml file. For everyday use, I use directly the Android port of the binary file encfs that comes with Cryptonite, and embed it into shell scripts. Up to now, no flaw, no problem. The password to open my encfs encrypted volumes is stored in a text file located on the /data partition. It is thus encrypted by Android and made accessible on boot when you decrypt this partition. So nothing more to remember.
To make things usable and practical, I use Tasker to automate the following things:
- Mount encfs volumes on start-up, by reading directly the password in the file located on /data
- Umount encfs volumes when usb is plugged
- Copy photos on a regular basis from the unencrypted /mnt/sdcard/DCIM to the safe place I created with encfs, delete AND wipe the original ones
Fifth step: be coherent about security
-----------------------------------------------------
Some people, torn apart by the paradigm described in Third step, by negligence or by lack of knowledge, strongly secure one part of the system, but make other parts big security holes.
Concretely, I am thinking about two examples: mixing encryption with pattern lock (or, even worse, with face unlock), or mixing encryption with usb debugging. Face recognition is just a jock. It is not reliable and fails very often. Moreover it is really easy to crack, with a photo for example. One of my colleague even achieved to unlock my phone with its own face, just because we are morphologically close enough. Pattern lock is not much better. (See: http://forum.xda-developers.com/showpost.php?p=37649447&postcount=6 and https://www.google.fr/search?q=smudge+attack).
So always ponder over (two times rather than one) each action you take that may touch system security.
Thanks lolo
I'm trying to use this on my VZW Galaxy S3 16Gb and this is what I'm seeing in TWRP v2.2.0:
Mounting System
Extracting system fixes
Update script starting...
Update script started
Disk /dev/block/mmcblk0p15: 13.1GB, 13140754432
4 heads, 10 sectors/track, 401024 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
ERROR: unlikely size of KB
aborting operation!
Update script ended
Unmounting system...
Update Complete
Click to expand...
Click to collapse
edit: The same thing happens with both scripts.
I need to enable device encryption because my employer requires it for email and other Google Apps for Business apps. Thank you for your help!
Anyone know why full disk encryption isn't available on some (if not most roms)? Is it something that needs to be added with intent aside in the building process, or dependent on how the stock rom was set-up to work with?
I was hoping this would help get encryption working on an EVO ics rom which has encryption available, but when you click "encrypt phone" it just hangs on an android screen and doesn't actually do anything.
i was really happy to find your solution to enable encryption on my HTC desire S (ICS, rooted), but unfotunately it doesn't work. the same thing happen to me as it happened to mushu13, only different numbers in lines 5 and 6. same result whichever script i choose. please help, i really need system encryption.
thanky you very much!
First thing you should know, I am not an Android Guru. And unfortunately, if your phone is not an A789, I won't be able to help you deep in technical details. Cybermaus is the most skilled of the two of us, technically speaking, and he may lack time to answer correctly every request he is regurlarly faced with.
Okay, I do not know your phones and don't own them. So, distant debugging is much harder in these conditions. But the first things you should check, before applying Cybermaus' patches, are :
1) if encryption works with stock rom
2) follow thoroughly all steps I described in "Second step: offline protection" of the second post of this thread :
- your phone or tablet internal storage partitions must be seen by your system as block devices. This is the case with eMMC but not with Yaffs. If you don't have this information from the manufacturer, install Terminal Emulator from the Play Store and type 'mount' in it. You should see lines beginning with /[email protected] and /[email protected] If this is not the case, I fear encryption won't be able to work on your device.
- use aLogcat to track down the origin of the failure (see resources on the internet to learn how to use it, and links I have put in the second post)
3) Be sure that required modules are built into the kernel you use, especially dm-crypt
4) Post your results and cross your fingers that either this is a problem I have already encountered (in this case I may help you further), or Cybermaus see your posts.
While this script did allow me to encrypt my phone, it also shrunk my /data partition to roughly 1.1 GB.
Any ideas on how to expand it back to a reasonable size? I supposedly have 4 GB of ROM, and I assume more than 1 GB ought to be available for data.
Sent from my HTC Sensation using xda app-developers app
Thank you for your nice guide.
Only one thing is missing: baseband security.
Attacks on the baseband system requires very skilled people. Such as government agencies. It is believed they use baseband attacks to break into almost every mobile device. And there is only little you can do. Some vendors like Cryptophone have mobile devices with a hardened Android system. All others have no way to protect their device against baseband attacks.
Is this patch and reasoning still valid for newer android releases.
I am running a custom kitkat rom and twrp on a note 3 and can't encrypt so im looking for a fix.
I have been looking around for fixes but different posts blame different things.
Sometimes its the fact its a custom recovery, sometimes its that root is on the device and then there is this reasoning
Is there a way to find out the cause and fix for kitkat?
Virus
Hi, i tried to download your files
ICS_usrdata_fix-fs.zip
ICS_usrdata_shrink.zip
But the file are exe files with viruses.
Any ideas?
u2funker said:
Hi, i tried to download your files
ICS_usrdata_fix-fs.zip
ICS_usrdata_shrink.zip
But the file are exe files with viruses.
Any ideas?
Click to expand...
Click to collapse
Maybe false alarm.
Lossyx said:
Maybe false alarm.
Click to expand...
Click to collapse
no, but if you search for these file, you will find some which work and which are without viruses. Check the link..it is not an zip file..it is an exe file
@cybermaus: just tried flashing the two *.zips on my Galaxy S 4 Mini running CM 12 (Android Lollipop) because my logcat tells me I'm getting the described cryptfs error. It seems my /data partition doesn't have that 1 MB of unused space needed for encryption. Now I would love to encrypt my phone using CM's integrated function without having to completely format the internal storage (because that's the other workaround I found: flash stock rom, wipe data (factory reset), flash Custom Recovery, flash CM again)
Do you have the time and device to update your script so it works with Android Lollipop as well? I see a lot of people come across this issue recently so there would be definetly use for such a nice script like yours!
Thanks for sharing this with us!
-Teutone
no available for download any mirror ?
Or write the script on the thread.
Thanks
Can you post the scripts? links are dead!
---------- Post added at 16:33 ---------- Previous post was at 16:32 ----------
cybermaus said:
If you ever used CWM, CWMT or other non factory recoveries to wipe your data, you probably noticed that you lost the ability to encrypt your phone. Or maybe you did not even realize this is why encryption does not work.
For the Android phone encryption to work, it needs the /data (usrdata) partition to have a little bit of unused space between the end of the filesystem and the end of the partition. And as soon as you use CWM to wipe, it actually reformats using all space, and encryption does not work anymore.
User lolo250612 brought this to my attention, and together we created a update.zip that shrinks the /data filesystem by 1MB
In fact, we created 2 patches: One to shrink, and one to first repair the filesystem. The first will refuse to shrink if the file system is not clean and healthy. They will automatically find the correct usrdata partition device and its size. The shrink will then resize to 1MB less then the partition size (which means it could also be used to grow if you somehow had a filesystem a lot smaller, for example because you restored an smaller image from somewhere).
Both patches are created with statically linked e2fsprogs binaries and its own static copy of busybox shell interpreter. So they should work on all Android devices that use ext file system (probably all V2.3.1 Gingerbread and higher androids), and you should not lose any data because of this. But it is always good to make a backup.
We tested this on 2 phones, both ICS phones, and with both CWM and TWRP type recoveries, and are fairly certain it is safe to use. But to repeat, you should always take a backup of your phone.
Both patches can be found on my shared drive:
ICS_usrdata_fix-fs.zip
ICS_usrdata_shrink.zip
Procedure:
- Make backup of your phone
- Place files on SD card
- Boot into recovery
- Apply the shrink update
- If it tells you the filesystem is damaged apply the fix-fs update first
The patch only shrinks the filesystem, nothing is actually installed or removed on the phone. But if you use encryption, you could leave this patch on your SD card so that every time you wipe data, you can run the shrink patch again afterward to enable encryption again.
If you do use this, please report back in this thread, possibly mentioning your phone model and ROM you are using.
Click to expand...
Click to collapse
links are dead. Can you post the scripts?

★★★★[INFO]ANDROID ROM & How they Work★★★★

★★★★[INFO]ANDROID ROM & How they Work★★★★
Parts of a ROM
i. The kernel.
Android (like many other Smartphone operating systems) runs on the Linux kernel. The Linux kernel was created in the early 1990’s by a gentleman named Linus Torvalds in Helsinki, Finland. It’s incredibly stable, incredibly friendly, and incredibly difficult for the layman to understand and modify. Thankfully it’s also very popular so it has been ported on to a multitude of hardware, including our Android devices.
Think of the kernel as an interface layer between the hardware and software on your device. The kernel decides when things happen, such as the LED indicator gets lit or when the soft button's LED gets lit. An application sends a request to the operating system to blink the LED. The operating system then sends the request to the kernel, which makes the light flash for the amount of time requested by the OS.
What sounds like a round-about way to get things done is also what makes the system so scalable and robust. Application developers only have to code in a way the operating system understands and the kernel makes it work on the hardware. This also keeps the application running in it’s own user-space and separate from the kernel. That means when you run the latest uber-cool app that wasn’t designed for your particular OS version, or is still very beta and it crashes, the kernel gives you the option to Force Close the application and the kernel can run untouched.
In a standard Android ROM (we will leave developer images and the like for another discussion) the kernel is bundled along with a set of instructions that tell the device how to load the kernel and the OS during boot. This is the boot.img that you see inside a zipped ROM that your not able to easily open. The device knows to extract this image to internal memory (the ramdisk) and follow a series of scripts (init scripts) to load the kernel and then the other portions of the OS. That’s what’s happening while you’re watching the boot animation. Interestingly enough this is done the same way for a PC, your smartphone, an Android tablet, or even a smart Linux powered toaster. If you’re feeling exceptionally geeky, plug your Android phone into the USB port on your PC and let the PC boot from the USB device. No, it doesn’t actually load, but you can watch the animation while it tries to match up the hardware support with what’s inside your PC. As I said, Linux is amazingly scalable and as a result so is Android.
What is a kernel? If you spend any time reading Android forums, blogs, how-to posts or online discussion you'll soon hear people talking about the kernel. A kernel isn't something unique to Android -- iOS and MacOS have one, Windows has one, BlackBerry's QNX has one, in fact all high level operating systems have one. The one we're interested in is Linux, as it's the one Android uses. Let's try to break down what it is and what it does.
Android devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of Android specific code built in, and Google's Android kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent Android developers and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software.
When software needs the hardware to do anything, it sends a request to the kernel. And when we say anything, we mean anything. From the brightness of the screen, to the volume level, to initiating a call through the radio, even what's drawn on the display is ultimately controlled by the kernel. For example -- when you tap the search button on your phone, you tell the software to open the search application. What happens is that you touched a certain point on the digitizer, which tells the software that you've touched the screen at those coordinates. The software knows that when that particular spot is touched, the search dialog is supposed to open. The kernel is what tells the digitizer to look (or listen, events are "listened" for) for touches, helps figure out where you touched, and tells the system you touched it. In turn, when the system receives a touch event at a specific point from the kernel (through the driver) it knows what to draw on your screen. Both the hardware and the software communicate both ways with the kernel, and that's how your phone knows when to do something. Input from one side is sent as output to the other, whether it's you playing Angry Birds, or connecting to your car's Bluetooth.
It sounds complicated, and it is. But it's also pretty standard computer logic -- there's an action of some sort generated for every event. Without the kernel to accept and send information, developers would have to write code for every single event for every single piece of hardware in your device. With the kernel, all they have to do is communicate with it through the Android system API's, and hardware developers only have to make the device hardware communicate with the kernel. The good thing is that you don't need to know exactly how or why the kernel does what it does, just understanding that it's the go-between from software to hardware gives you a pretty good grasp of what's happening under the glass. Sort of gives a whole new outlook towards those fellows who stay up all night to work on kernels for your phone, doesn't it?
Click to expand...
Click to collapse
ii. The operating system.
Once the kernel is loaded, the init scripts tell the Operating System to load. Android is the user interface for a custom built Java virtual machine called Dalvik. Dalvik was written by Dan Bornstein, who named it after the fishing village of Dalvik in Iceland, where his family originated from. The debate of which Java VM is superior is best left for another discussion, so I’ll simply say that DalvikVM is a register-based machine versus true JavaVMs which are stack based.
The Dalvik machine creates executable files (.dex files) which can be interpreted by the OS and run by the end user. These .dex files are OS version dependant. That simply means that applications and core functions built to work with one version of Android may or may not work well with other versions. Google provides the tools through it’s Software Development Kit (SDK) for applications to communicate with the OS.
Click to expand...
Click to collapse
iii. Core functions.
No smartphone would be complete without a set of functions that allow the device to be used as intended. Things like the phone and dialer interface, the calendar, the messaging system are core functions of the Operating System. In Android, these are run on top of the kernel as separate applications. The merits (or lack of) of providing these needed functions as separate applications is once again best left for another discussion, but this is what allows developers like HTC or Motorola to replace the standard functions with alternatives that provide a different look and feel from stock. HTC’s onscreen keyboard or Motorola’s MotoBlur contact list are great examples of this. The “little guy” isn’t left out of the mix either. Handcent SMS or Chomp SMS can integrate into the OS very well, as most of us already know.
An additional set of Core Functions are provided by Google. Popularly called GoogleBits, things like Gmail, sync, Gtalk and the Android Market are applications written by Google that give an extra set of useful functions to the OS. You’ll find these on all smartphones, as well as many other Android devices.
Click to expand...
Click to collapse
iv. Optional applications.
These are applications provided by the manufacturer to give the device even more usability. Things like the Amazon MP3 store, PDF readers, Corporate Calendar etc. allow you to do even more with your device. Remember - Droid Does
Click to expand...
Click to collapse
B. How is a ROM packaged?
In most cases a ROM will come packaged in a .zip file. The recovery image’s kernel (yes, it has one too!) has the ability to unzip and copy the contents into the correct place. Inside this zip file is a folder (META-INF\com\google\android\) that contains a script prepared by the ROM “cooker” (another of those techie terms - it means the person(s) who developed the ROM) that tells the system what to format, what to copy and where, and any file operations that need to be done. Each device does things a bit differently, but this script is where it all gets done. More on this folder later.
You’ll also see a /system folder. This is the meat of the ROM. It has the necessary OS files, the Core functions, and any optional applications the cooker decided to include. The folder is structured the same way it is on your device - /system/app, /system/framework, etc. The whole tree is usually copied over and the existing /system folder is overwritten. The cooker uses the script to tell the kernel to erase the existing system folder, copy the new folder over, and set the file permissions.
Sometimes you will also see a data folder. This usually is space set up for optional applications, including optional system tools like busybox or SuperUser white list. These applications could be placed in the /system folder, but placing them in the data folder makes it easier for the end user (you and I) to remove or update them as needed.
You’ll also notice a META-INF folder. This contains the update script we talked about earlier, as well as secure keys that need to be provided so the device knows the update can be trusted. A special note needs made here. Trusted means that the update is trusted to be in the correct form to load the device. It in no way means the ROM is safe from malicious code. Anyone is able to use a set of test keys and create a ROM that will flash and run your device - even those people with bad intentions. Flashing and running a custom 3rd party ROM is putting faith in the cooker that he or she not only knows what they are doing, but are honest as well. Also, some Motorola custom ROMs will have a small update.zip stored inside this folder to be run on first boot of the device.
Finally we are left with the boot.img file. This is the kernel and ramdisk image we discussed earlier. Your phone copies this over to be decompressed and run when the device boots.
Click to expand...
Click to collapse
2. How do I install a ROM?
In this section we’re discussing how to install a custom 3rd party ROM. ROMs from the manufacturer usually have a utility that runs on your PC to flash and load the new image.
A. Got Root???
Yes ?:good:!!!
Custom ROM’s simply will not load on devices that aren’t rooted. In theory, it may be possible to sign a 3rd party ROM with the keys that the stock recovery image will flash, but for the most part you need to have flashed a custom recovery image before you can change your device’s ROM. Instructions and tutorials on how to root your device are all over the internet. Some are good, some are bad. The hacking forum is a great place to go and learn more about rooting and how to successfully get it done on your device.
Click to expand...
Click to collapse
B. Recovery
Most Android devices have had a custom recovery image written for them. This will overwrite the stock recovery image, allowing you to flash 3rd party ROMs as well as giving extra functionality. Help with finding and flashing the custom recovery image for your device can also be found in the hacking forum. The installation of a custom recovery image also allows for a very important function. Backup and restore.
Click to expand...
Click to collapse
.C. Nandroid
Nandroid is a set of bash scripts and code written by that copies the state of your system and stores it in a folder on your SD card. You can then use the restore function of Nandroid to restore to this point at any time. This is a priceless feature and reason enough to root your phone. It’s included by default in most custom recovery images, and the code is freely available to use if you’re inclined to write your own recovery image.
Click to expand...
Click to collapse
In most situations, using Nandroid to back everything up is easy:
1. Verify you have a memory card with enough free space (~300MB to backup, ~500MB to restore).
2. Reboot your device into recovery. It’s slightly different for each device, once again hacking forum FTW!
3. Navigate through the menu and select the Nandroid Backup function.
4. Apply your choice and wait for the device to tell you it’s finished.
It’s always good practice to copy the entire nandroid folder from your SD card to a safe place. You can then copy it back to the SD card if the card is ever damaged, lost or erased.
D. Copy and Flash
You’re rooted, have downloaded a custom ROM, have your system backed up and are now ready to flash your device. This is not nearly as scary as it sounds.
1. Mount your SD card to your PC, and copy the .zip file to the root folder of the card. Don’t unzip the file, and don’t look for a folder called root. The root folder in this case means the base folder, what you will see when you mount your card to a PC or the device.
2. Reboot your phone into recovery.
3. Navigate through the recovery menu and select the flash update option. Depending on your recovery image, the file may need to be named update.zip, or you may be able to select any zip file on your card as long as it’s the correct format. The cooker knows this as well and if the ROM needs to be named update.zip it will be.
4. Apply your choice and wait for your device to tell you it’s finished.
5. Reboot.
Click to expand...
Click to collapse
It’s worth noting that many times a new ROM will require that you wipe and factory reset your devices data. While inconvenient, it’s often necessary to get rid of the old data as it may be incompatible. As long as you’re using the cloud for calendar and contacts, they will be re- downloaded and stored back on your device automatically.
Dirty flash and Clean flash
A dirty flash is only wiping cache and davlik then flashing your ROM....
a Clean flash is at LEAST factory reset/data wipe + wiping davlik(factory wipe takes care of /cache also)... Maybe doing a format /system also.
***Odin***
Odin is the ROM Flashing Tool for SAMSUNG smartphones. ROM files flashable with Odin come with .tar extension.
Most of the ROMs you are going to flash with Odin are the official stock Samsung ROMs (or leaked stock ROMs). Custom ROMs are rerely flashable by Odin because they come with .zip extension that Odin does not recognize (it recognizes .tar files).
Custom kernels, however, are sometimes provided in .tar format by their developers (e.g. CF-Root kernels), so that they can be flashed by Odin. When your phone is new and running official firmware you most often cannot flash a custom ROM to it because a Samsung phone often requires a custom recovery and root rights that are included in a custom kernel to be able to flash custom ROMs. That's why Odin often comes in handy in rooting and flashing a custom firmware to your phone because you (often) can flash a custom kernel with it that already includes root and custom recovery and enables you to flash custom firmware (custom ROMs). I use the word "often" very frequently in the previous sentence because every Samsung smartphone is different and requires various procedures for rooting it and flashing custom ROMs (see the section about using Odin below).
If it comes to stock ROMs, the best source of stock (official) Samsung ROM files is located at this excellent website: SamMobile.com/firmwares (link). It requires registration (it's free) and I encourage you to set up an account there because you will most likely use this site several times during your stay at XDA. You will most likely come across 1 .tar or 3 .tar file ROMs there, flashable by Odin. Refer to the Odin flashing guide below for more info.
Click to expand...
Click to collapse
****Heimdall****
What is Heimdall?
Heimdall is a cross-platform open-source tool suite used to flash ROMs onto Samsung Galaxy S devices.
How does it work?
Heimdall uses the same protocol as Odin to interact with a device in download mode. USB communication in Heimdall is handled by the popular open-source USB library, libusb-1.0.
Why “Heimdall”?
The flashing software Odin is named after the king of gods in Norse mythology. Loke, the software component on the Galaxy S that provides functionality to flash, may also to be named after an important character in Norse mythology, often translated as Loki. As such I have named my flashing software Heimdall, after the Norse god, and guardian of the Bifrost Bridge.
What platforms does Heimdall run on?
Linux, OS X and Windows (XP, Vista, 7 etc.)
Why use Heimdall when we can use Odin?
Odin is generally unreliable and only runs on Windows systems. Furthermore, Odin is leaked Samsung software that is not freely available or well understood by the community.
Is Heimdall safe?
No matter what method you chose, flashing firmware onto your phone has a lot of potential for disaster. We have tested Heimdall with a variety of phones flashing several different firmware versions resulting in a 100% success rate. As such we believe that Heimdall is generally reliable. However keep in mind, just like any flashing software, Heimdall has the potential to brick your phone if not used correctly.
How do Galaxy S phones get bricked when flashing?
Besides the inherent risks like power outs, accidental removal of the USB cable etc. The Galaxy S appears to be running extremely unreliable USB control software.
A failure to flash does not automatically equate to a bricked phone. However if you're extremely unlucky and the flash fails whilst transferring the primary boot-loader, secondary boot-loader or params.lfs (all quite small) than you've got yourself a paper weight that you're hoping Samsung will replace.
Please be extremely careful mixing files from different firmware releases. Don't do so unless you're certain it will work!
What Galaxy S variants has Heimdall been tested with?
We’ve tested Heimdall with a Galaxy S GT-I9000 (8 GB) from the United Kingdom and Galaxy S GT-I9000 (16 GB) from Australia. We don’t personally have access to any other devices to test with, however users have confirmed Heimdall functions correctly with the AT&T Captivate, Bell Vibrant, Telstra GT-I9000T, Epic 4G and the Galaxy Tab.
Click to expand...
Click to collapse
^
CWM Errors and Solutions
ERRORS encountered in CWM Recovery
.
What is CWM Recovery ?
ClockworkMod Recovery is a custom recovery for many Android devices. It is considered to be the most popular recovery for Android due to its easily-ported nature, and integration with ClockworkMod ROM Manager by Koush(Koushik Dutta). The easiest way to recognize it is by the printed name when it first starts, and the background logo of a gear and hat.
Click to expand...
Click to collapse
ERROR STATUS 6
This is usually caused by CR/LF EOL(Windows style End Of Line) in updater-script. Change it to LF EOL(Unix Style EOL) using Linux command: dos2unix updater-script, then re-signing the ZIP, will usually fix this error.
Click to expand...
Click to collapse
ERROR STATUS 7
This is usually caused by a corrupt download, or bad file signature. Re-downloading (or re-signing) the ZIP will usually fix this.
Click to expand...
Click to collapse
We have been consistently seen and heard people facing error “Status 7″ error while trying to flash or install
custom ROMs or firmware packages on their Android smart phones or tablets with ClockworkMod Recovery. Many
of the users are nowadays facing this problem with CWM Recovery while flashing .zip files of modded or custom
Ice Cream Sandwich (ICS) or Jelly Bean (JB) ROMs on their devices. So, you have also downloaded a custom ROM,
placed its .zip file in your phone’s or tablet’s SD card, booted into ClockworkMod Recovery, selected – “install zip
from sdcard” and then chosen the .zip file of the ROM to get it installed on your device. But instead of getting
flashed successfully, if you are facing the issue mentioned below, then just keep reading this article to find out
what’s wrong and fix up the problem :
Finding update package…
Opening update package…
Installing update…
Error in /sdcard/custom-jelly-bean-rom.zip (Status 7)
Installation aborted
Click to expand...
Click to collapse
or the following error right after CWM recovery shows –
Installing update…
assert failed: getprop(“ro.product.device”) == “I9103″ || getprop(“ro.build.product”) == “I9103″ || getprop
(“ro.product.board”) == “I9103″
Error in /sdcard/android-4-1-1-ics-rom-latest.zip (status 7)
Click to expand...
Click to collapse
So, if you are facing any of these errors while trying to install the desired custom ROM package on your Android
phone or tab, then you may try a various things or steps which may turn out to be the workaround of this
problem. Here are a few tips to get this “Status 7” error fixed in ClockworkMod Recovery and flash the ROM
successfully on your device :
(1) First of all, make sure your device’s bootloader is unlocked. If it is already unlocked but you are still
not able to flash the ROM, then just extract the .zip file of the ROM into a new folder, find the boot.img file from
that directory and flash it up on your phone or tablet via fastboot on your PC.
(2) Make sure that you are having the appropriate Radio or Baseband version installed on your device which is
supported by the custom ROM you are trying to flash. Most of the ROMs requires the latest version of Baseband, so
just update or upgrade your device to the latest Baseband version and then try to install the ROM once again.
(3) Update your device to the supported / latest build of official firmware before trying to install the ROM. You can
do it from – Settings > About Phone / Device > Software Update.
(4) Make sure you are having the supported or required kernel installed on your phone or tab. If it’s not, then flash
a new kernel right away and try to install your custom ROM once again.
(5) Is the ROM which you are trying to flash really works ? Find out whether it is working for other users or not.
Click to expand...
Click to collapse
Error Status 0
Well sometimes while flashing some ROMs especially the cooked ones we get Error status 0 in the CWM Recovery
this error is an indicator of Wrong Update Binary.This is usually caused by an incompatible update-binary in edify ZIPs. Replacing it with a compatible one, then re-signing the ZIP, will usually fix this error.
Click to expand...
Click to collapse
Partitions
Now it's time for the partitions :good:
Let’s start with a list of standard internal memory partitions on Android phones and tablets. These are:
/boot
/system
/recovery
/data
/cache
/misc
In addition, there are the SD card partitions.
/sdcard
/sd-ext
Note that only /sdcard is found in all Android devices and the rest are present only in select devices. Let’s now take a look at the purpose and contents of each of these partitions.
/boot
This is the partition that enables the phone to boot, as the name suggests. It includes the kernel and the ramdisk. Without this partition, the device will simply not be able to boot. Wiping this partition from recovery should only be done if absolutely required and once done, the device must NOT be rebooted before installing a new one, which can be done by installing a ROM that includes a /boot partition.
/system
This partition basically contains the entire operating system, other than the kernel and the ramdisk. This includes the Android user interface as well as all the system applications that come pre-installed on the device. Wiping this partition will remove Android from the device without rendering it unbootable, and you will still be able to put the phone into recovery or bootloader mode to install a new ROM.
/recovery
The recovery partition can be considered as an alternative boot partition that lets you boot the device into a recovery console for performing advanced recovery and maintenance operations on it. To learn more about this partition and its contents, see the ‘About Android Recovery’ section of our guide to ClockworkMod recovery.
/data
Also called userdata, the data partition contains the user’s data – this is where your contacts, messages, settings and apps that you have installed go. Wiping this partition essentially performs a factory reset on your device, restoring it to the way it was when you first booted it, or the way it was after the last official or custom ROM installation. When you perform a wipe data/factory reset from recovery, it is this partition that you are wiping.
/cache
This is the partition where Android stores frequently accessed data and app components. Wiping the cache doesn’t effect your personal data but simply gets rid of the existing data there, which gets automatically rebuilt as you continue using the device.
/misc
This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc. This is an important partition and if it is corrupt or missing, several of the device’s features will will not function normally.
/sdcard
This is not a partition on the internal memory of the device but rather the SD card. In terms of usage, this is your storage space to use as you see fit, to store your media, documents, ROMs etc. on it. Wiping it is perfectly safe as long as you backup all the data you require from it, to your computer first. Though several user-installed apps save their data and settings on the SD card and wiping this partition will make you lose all that data.
On devices with both an internal and an external SD card – devices like the Samsung Galaxy S and several tablets – the /sdcard partition is always used to refer to the internal SD card. For the external SD card – if present – an alternative partition is used, which differs from device to device. In case of Samsung Galaxy S series devices, it is /sdcard/sd while in many other devices, it is /sdcard2. Unlike /sdcard, no system or app data whatsoever is stored automatically on this external SD card and everything present on it has been added there by the user. You can safely wipe it after backing up any data from it that you need to save.
/sd-ext
This is not a standard Android partition, but has become popular in the custom ROM scene. It is basically an additional partition on your SD card that acts as the /data partition when used with certain ROMs that have special features called APP2SD+ or data2ext enabled. It is especially useful on devices with little internal memory allotted to the /data partition. Thus, users who want to install more programs than the internal memory allows can make this partition and use it with a custom ROM that supports this feature, to get additional storage for installing their apps. Wiping this partition is essentially the same as wiping the /data partition – you lose your contacts, SMS, market apps and settings.
With this, we conclude our tour of Android partitions. Now whenever you install a ROM or mod that requires you to wipe certain partitions before the installation, you should be in a better position to know what you’re losing and what not and thus, you’ll know what to backup and what not.
You should at least post the source of such a large copy paste post.
Sent from my GT-N7100 using Tapatalk 2
Source? How do you post a source for an article which is compiled from 10+ sites? Plus my own addition?
Started from the bottom
Good job man, this saves me the time to do all this researches.
Keep it up
Best regards
Sifou
Using a Samsung N7100
sos_sifou said:
Good job man, this saves me the time to do all this researches.
Keep it up
Best regards
Sifou
Using a Samsung N7100
Click to expand...
Click to collapse
DO tell me if you have some suggestions for the thread.
"Thanks button is just to avoid "THANKS" posts in threads. Nothing more than that. Don't ask in signature or post for it and defeat the purpose why it was introduced"
I think that this is a pretty good summary of the basics. I even converted it to epub and stocked it on my e-reader for reference
You can get to the details if you want? Adding some info about flashing softwares like odin and the Linux based one (i don't remember it name)
The different recoveries available and their advantages vs désavantages
How to protect yourself from malicious applications, starting from knowing what are permissions...
Keep it up mate
Best regards
Sifou
Using a Samsung N7100
sos_sifou said:
I think that this is a pretty good summary of the basics. I even converted it to epub and stocked it on my e-reader for reference
You can get to the details if you want? Adding some info about flashing softwares like odin and the Linux based one (i don't remember it name)
The different recoveries available and their advantages vs désavantages
How to protect yourself from malicious applications, starting from knowing what are permissions...
Keep it up mate
Best regards
Sifou
Using a Samsung N7100
Click to expand...
Click to collapse
Heimdall?
"Thanks button is just to avoid "THANKS" posts in threads. Nothing more than that. Don't ask in signature or post for it and defeat the purpose why it was introduced"
Tha TechnoCrat said:
Source? How do you post a source for an article which is compiled from 10+ sites? Plus my own addition?
Started from the bottom
Click to expand...
Click to collapse
I guess you have a point, it's just the scientist in me with source-referral-ocd.
Sent from my GT-N7100 using Tapatalk 2
adytum said:
I guess you have a point, it's just the scientist in me with source-referral-ocd.
Sent from my GT-N7100 using Tapatalk 2
Click to expand...
Click to collapse
DO tell me if you have any problems or if you want something to be added.
"Thanks button is just to avoid "THANKS" posts in threads. Nothing more than that. Don't ask in signature or post for it and defeat the purpose why it was introduced"
Thread updated with Odin and Heimdall information.
"Thanks button is just to avoid "THANKS" posts in threads. Nothing more than that. Don't ask in signature or post for it and defeat the purpose why it was introduced"
Tha TechnoCrat said:
Source? How do you post a source for an article which is compiled from 10+ sites? Plus my own addition?
Started from the bottom
Click to expand...
Click to collapse
By listing ALL the different sources? And obviously crediting yourself with bits you've added.
Sent from my GT-N7100 using xda premium
You should make the title of the thread more presentable though.
Simone said:
You should make the title of the thread more presentable though.
Click to expand...
Click to collapse
Would like some suggestions.
"Thanks button is just to avoid "THANKS" posts in threads. Nothing more than that. Don't ask in signature or post for it and defeat the purpose why it was introduced"
Tha TechnoCrat said:
Would like some suggestions.
"Thanks button is just to avoid "THANKS" posts in threads. Nothing more than that. Don't ask in signature or post for it and defeat the purpose why it was introduced"
Click to expand...
Click to collapse
You should think of your own. That would be the best
Make it more professional looking, though.
Everything else is good.
Guys I have got my Note 2 finally. Will compile some guides for it too.
Sent from my GT-N7100 using xda app-developers app
You bought a note 2? Congrats mate !
Best regards
Sifou
Using a Samsung N7100
sos_sifou said:
You bought a note 2? Congrats mate !
Best regards
Sifou
Using a Samsung N7100
Click to expand...
Click to collapse
Thanks buddy. Get ready for more guides
Sent from my GT-N7100 using xda app-developers app

Install CyanogenMod 12.1 on Barnes & Noble Nook HD or Nook HD+ in Five Easy Steps

Want to try Nougat on your Nook HD+ or HD?
Installing Nougat has never been easier. Procedure described in post 239 of this thread.
Development for unofficial CM-12.1 for Nook HD and Nook HD+ has ceased.
The author @amaces has moved on to Marshmallow (Android 6), and the zip files for these progressive releases are what you now see at the collaboration link. If you wish to install CM-12.1 look instead through the pages of his "obsolete" folder for "cm-12.1-20151018" and "twrp-2.8.7.4" final releases. CWM should install these properly but later versions are likely to fail due to deficiencies in the CWM recovery utility.
Better yet try the latest Marshmallow and TWRP versions. For this you must create a new bootable microSD card using these files provided by @belfastraven and the downloaded zip files "cm_hummingbird-ota-MHC19Q.160407.zip" and "twrp-3.0.1-0-hummingbird.zip". These versions may advance by the time you happen to do this. The procedure is the same as described in the .pdf guide for CM-12.1, except with the new files.
And use a current GApps file for the ARM platform, Android 6.0 from http://opengapps.org/.
This is a detailed tutorial for beginners. Seasoned users may find it overly verbose.
My toy box contains some Nook HD and Nook HD+ tablets, and I recently became aware of CyanogenMod. I studied about it for a while and finally tried a CM-12.1 installation. It was successful, and I was so impressed by the improvements that I told some Nook-owning friends about it. They quickly decided to do likewise and asked for instructions.
My friends and I are all retirees, so we have seven Saturdays a week to spend as we wish. I decided to spend a few of mine re-writing my notes into an instruction manual. As of today, September 25, 2015, there are eleven formerly stock Nook tablets whose beginner-owners have followed the instruction and successfully installed CM-12.1. Several of these are being regularly updated as revisions are released. No bricks have been cast so far.
During the study period I spent a lot of time on xda developers pages, and it eventually occurred to me that there might be other beginners who could make good use of Nook-specific instructions. So I am pleased to offer this manual to anyone interested, and hope it will save you some time and trouble.
The procedure uses the technique and boot files by @leapinlar. The ROM and TWRP zip files used are those created by @amaces. Profound thanks to these experts for their diligent work and generosity.
Below is a synopsis of the instructions. The complete PDF document is attached to this post.
This document will guide you through the steps of installing a pure modern version of the Android operating system on your Nook HD or Nook HD+ tablet. The installation is done from a bootable microSD card using the ClockWorkMod recovery utility to install the contents of zip files. This straightforward method does not require ADB or rooting the Nook. The result is CM-12.1 installed with basic Google apps and your choice of TWRP or CWM for your resident recovery utility.
There's room for improvement.
If I could learn how to create a bootable microSD that would boot to TWRP instead of CWM the procedure could be reduced to four easy steps. I have found no help for this, and my own attempts have all failed. I would be most grateful for any help so I can update the instructions.
This is brilliant!
Where was this three days ago ? I really could have used this when I finally got around to fixing my dead Nook HD+ with spare parts from an ebayed broken on, and decided to finally go for broke on EMMC (after SD Boot killed the device twice on me while charging overnight.) Not a fun initial teardown to pull out that mainboard, but manageable with a good deal of care.
My own fumbling around led me to using verygreen's external recovery image here (Note, they are the Initial sdcard Images located at the very top) as recommended by amaces writing it to the SDcard using Win32DiskImager for a bootable sdcard (On Windows 10 here). Then using that, I went and installed amaces' TWRP and CM12.1 onto the Nook HD+ followed by finding a set of gapps to install as well.
I missed the backup/wipe parts of your guide, sadly. Though I do have a stock copy laying about, and my device has been out of warranty for a while by now. I just didn't think of doing the wipe (though looking back, the broken one I took the mainboard from and its EMMC already had that done). Further, I was lost seeing that "Root" fix note and ended up hitting yes. Fortunately, it doesn't appear to have done anything for my tablet.
In the end? I got my Nook HD+ up and running using amaces' CM12.1 ... even if in a manner that may make those more experience wince at my errors. Still, its nice to have my large tablet for reading and watching videos once more rather then needing to spend a couple hundred dollars on a decent large tablet. Gaming isn't up to par (older games still does decently), but its an old device and not exactly what I wanted it for anyways.
I just wish I held off a couple more days so I had this guide to help me through this. Still, for anyone that comes after I hope your efforts help them.
Thank you for taking your time and writing such a useful guide. I am currently on cm11 m12. Are there any noticeable difference between 12.1 and cm11? Is the update from cm11 to 12.1 the same as from stock to 12.1?
Holy crap that is awesome. Looks like I picked the perfect day to upgrade the kids YouTube machine from 4.4
Sent from my SAMSUNG-SM-G920A using XDA Free mobile app
Thank you for taking the time to put together this extremely easy to follow guide! It helped me breath new life into my Nook!
Thanks so much for writing up a document us older folks can handle. (and say hello to Sequim for me!)
:good:
Cheers.
This looks like exactly what I need. I've finally reached the point of frustration with my Nook HD+ that I'm ready to go through with a reflash. Thanks so much for providing this great resource.
But, one question. You advise not modifying the user interface after flashing CM 12.1 to the device. This is because the ROM is still under development, and making chages of that sort will make upgrading to newer images more difficult. In principle, I understand this. But is this a permanent condition?
In other words, I suppose development on CM 12.1 will go on until interest in it is lost and the project goes moribund. No one can predict when that will happen, but if things go as they have for the past couple of decades, this project is likely to be abandoned sooner rather than later. So is there some projected point when the project reaches stability and when users can make interface changes without worry of having problems upgrading? Or is the inadvisability of making such personalization modifications a permanent condition?
i got it installed simple enough but cant seem to login to my google account, it just tells me something went wrong and wont sign in, any ideas what i can do?
I used this manual to put CM 12.1 on my Nook HD+ and it worked great. What a wonderful resource you've provided.
A couple of minor issues I encountered are as follows. The directions in step 5e call for rebooting the system, but the menu I encountered did not correspond precisely to the description, What is described in step 5e is a two-step process, first slecting "reboot," then "power off." However, when I tapped the "reboot" button, there was no subsequent option to power off; the device simply rebooted. That didn't prove to be much of an issue since, realizing the Nook would be trying to boot from the SD card, I simply quickly removed it in a very early stage of the boot process.
Another minor issue is that the file system is kind of strange, with the backed up data being located under /storage/emulated, with a couple of symlinks in other locations to that same directory. It's kind of puzzling to find my way around the system. That said, so far everything works and all my previous data seems to have been preserved.
As far as improvements to the guide, you might want to add the additional directive that developer options can be gained by going to Settings > About table and tapping on "build number" seven times. I wanted to change the hostname on the new installation, and I needed developer options to do that. I don't know how many retirees are going to want to do things like that but, age wise, I'm not too far away from that category, and I needed that. So, maybe something you could add at the end of your nice manual.
As to booting directly into TWRP, I found an img file at twrp.me under /devices/barnesnoblenookhdplus.html. It looks like directives there are for writing it to the internal recovery partition, but I don't see why it could not be written to an sd card by slightly adapting those same directives. I'm new enough to this to not quite understand whether the recovery image would answer to your issue, but it's something you might want to consider.
All in all, you've provided a nice resource with this guide. It worked well for me on a first try, so it's something I'd definitely recommend to others.
Question about step 3b from the manual (Backup the existing system and data to the microSD card). Let's say this is a brand new Nook HD+ that contains no data or configuration that the user wishes to preserve: can that step just be skipped in such a case?
I'm asking because my current Nook HD+ has a pretty badly cracked screen and I'm thinking of replacing the unit with another Nook HD+. Doing this upgrade to CycanogenMod has got me thinking more seriously about getting a unit with an intact screen. If I end up replacing the unit, there will be no data or configuration on the replacement unit that I'll be wanting to preserve.
wayover13 said:
Question about step 3b from the manual (Backup the existing system and data to the microSD card). Let's say this is a brand new Nook HD+ that contains no data or configuration that the user wishes to preserve: can that step just be skipped in such a case?
Click to expand...
Click to collapse
It wouldn't hurt to have a backup of Stock, imo. Further, its useful habit to get into as you upgrade to any new image that is released and not loose everything. If only to allow you to reset to the default state and try again.
wayover13 said:
But, one question. You advise not modifying the user interface after flashing CM 12.1 to the device. This is because the ROM is still under development, and making chages of that sort will make upgrading to newer images more difficult. In principle, I understand this. But is this a permanent condition?
Click to expand...
Click to collapse
I'm a bit lazy when it comes to installing incremental releases, so I prefer to do simple "dirty installs". This means re-flashing without wiping the old installation, which can be done in seconds with no consequences.
But a dirty install will probably fail if you have made user-interface changes, even if you try to reverse out those changes before flashing. You can still install revisions anytime you wish, but you must do the wipes first. This means you will have to go through the setup procedure all over again, which takes a lot longer than a dirty install.
CM-12.1 for our Nooks should eventually be offered among the official nightly releases, and hopefully a milestone release now and then. I might consider UI tweaks after installing one of these, then settle down for a long quite period of no more updates.
If a stable CM-12.1 ever happens, we'll all be installing CM-13 by then.
wayover13 said:
The directions in step 5e call for rebooting the system, but the menu I encountered did not correspond precisely to the description, What is described in step 5e is a two-step process, first slecting "reboot," then "power off." However, when I tapped the "reboot" button, there was no subsequent option to power off; the device simply rebooted.
Another minor issue is that the file system is kind of strange, with the backed up data being located under /storage/emulated, with a couple of symlinks in other locations to that same directory. It's kind of puzzling to find my way around the system. That said, so far everything works and all my previous data seems to have been preserved.
As far as improvements to the guide, you might want to add the additional directive that developer options can be gained by going to Settings > About table and tapping on "build number" seven times. I wanted to change the hostname on the new installation, and I needed developer options to do that.
As to booting directly into TWRP, I found an img file at twrp.me under /devices/barnesnoblenookhdplus.html. It looks like directives there are for writing it to the internal recovery partition, but I don't see why it could not be written to an sd card by slightly adapting those same directives. I'm new enough to this to not quite understand whether the recovery image would answer to your issue, but it's something you might want to consider.
All in all, you've provided a nice resource with this guide. It worked well for me on a first try, so it's something I'd definitely recommend to others.
Click to expand...
Click to collapse
I too was puzzled a few times. There are two "Reboot" buttons: One in the TWRP entry menu and the other is deeper in where the flash process ends. The one in the entry menu will present a Reboot menu with includes a Power Off button. Use the tablets move-back triangle below the screen to navigate back to the entry menu.
I think you refer to the stock backup made by CWM before flashing CM-12.1. My stock Nooks were under-used with no data worth recovering, so I never looked into this. If you'd care to share any details about your findings it might be helpful so some subsequent readers.
This one is covered on Page 15 (actually sheet 17 including cover page and Table of Contents) under the heading Reboot to Recovery.
Once TWRP is installed its pretty easy to use it to install a newer version of it. But getting the boot files prepared on a microSD to boot to this image turned out to be more complicated than my very limited experience could manage (I'm a retired orchardist). The CM-12.1 installation procedure would be greatly improved if I can make this work, but I really need some professional help to make this happen. I keep hoping for a knowledgeable person to come forward.
Thank you very much. There are so many helpful members on this forum, and it is gratifying that I've been able to make a tiny contribution.
zspeciman said:
Thank you for taking your time and writing such a useful guide. I am currently on cm11 m12. Are there any noticeable difference between 12.1 and cm11? Is the update from cm11 to 12.1 the same as from stock to 12.1?
Click to expand...
Click to collapse
I tried CM-11 briefly on one of my Nooks before I became aware of CM-12.1, so I can tell you there is a huge difference. The move is from Android 4.4 to Android 5.1. And in my opinion all of this huge difference is for the better.
If you use the instructions, you can follow them exactly to move from CM-11 to CM-12.1. You are going to wipe the existing installation entirely, so it matters not what it is.
siccoblue said:
i got it installed simple enough but cant seem to login to my google account, it just tells me something went wrong and wont sign in, any ideas what i can do?
Click to expand...
Click to collapse
I've been pondering this, but nothing has yet come to mind. I'm presuming you did the full wipe before starting the install.
Which GApps did you install? If, for example, you chose one of the more sophisticated packages (tk_gapps or open_gapps) you would have had to defer installing it until Step 5. If so, and if you were distracted for a while and forgot to install it, I suspect the setup process would not offer an opportunity to log in to your Google account. This is probably not your issue since you were able to attempt a login.
Were you replacing the stock Android? Any other clues you can offer?
I managed to fix it, I had to completely wipe everything as opposed to just a normal reformat and it fixed the issue, but I actually have another problem now, I'm trying to do this on my second nook and when I attempt to flash twrp, cwm recovery now throws me an error on both my tablets, along the lines of "cannot install recovery this was designed for ovation and you are on ." it says that the device is . and won't let me flash it, any ideas?
PeteInSequim said:
I'm a bit lazy when it comes to installing incremental releases, so I prefer to do simple "dirty installs". This means re-flashing without wiping the old installation, which can be done in seconds with no consequences.
Click to expand...
Click to collapse
I understand vaguely what you're talking about here, but I'm pretty new to flashing Android devices and find myself wanting to know more. Is there some link you can point me to that explains in greater detail about dirty versus other types of installations? What I'm most interested in learning is how much configuration is too much to permit a dirty install. For example, the tablet is of little use to me if I can't install certain apps on it; will installing apps, for example, obviate the possibility of the sort of dirty install you're speking of?
PeteInSequim said:
But a dirty install will probably fail if you have made user-interface changes, even if you try to reverse out those changes before flashing. You can still install revisions anytime you wish, but you must do the wipes first. This means you will have to go through the setup procedure all over again, which takes a lot longer than a dirty install.
Click to expand...
Click to collapse
For example, I want a battery percentage monitor in the taskbar. If I enable that, is that the sort of user interface change after which I will be unable to do a dirty install? How about deleting what I would call desktop icons and/or adding others from newly-installed apps? Is that the sort of user interface change that will cause me to be unable to do a dirty install? If so, it seems like I would need to become a sort of beta tester in order to retain the possibility of doing further dirty installs, rather than using my Nook for my everyday needs.
PeteInSequim said:
CM-12.1 for our Nooks should eventually be offered among the official nightly releases, and hopefully a milestone release now and then. I might consider UI tweaks after installing one of these, then settle down for a long quite period of no more updates.
If a stable CM-12.1 ever happens, we'll all be installing CM-13 by then.
Click to expand...
Click to collapse
I'm obviously not too well versed in CynaogenMod/Android development. I wasn't aware that CM-12.1 was at such an early stage of development. Let me see if I'm, understanding correctly: is the CM-12.x series tracking Lollipop, while the projected CM-13 will track Marshmallow (Marshmallow being, as I understand it, the next Android release)?
I've obvioulsy got a lot to learn on this front.
---------- Post added at 11:24 PM ---------- Previous post was at 10:55 PM ----------
PeteInSequim said:
I too was puzzled a few times. There are two "Reboot" buttons: One in the TWRP entry menu and the other is deeper in where the flash process ends. The one in the entry menu will present a Reboot menu with includes a Power Off button. Use the tablets move-back triangle below the screen to navigate back to the entry menu.
Click to expand...
Click to collapse
Yes, on a second attempt I realized I needed to hit the move-back trinagle to get to the reboot button to which the manual was referring. Thanks for the clarification.
PeteInSequim said:
This one is covered on Page 15 (actually sheet 17 including cover page and Table of Contents) under the heading Reboot to Recovery.
Click to expand...
Click to collapse
You're right. I should have kept reading
On my second try, I realized I'd noted another discrepancy in the manual, one that occurs between steps 5a and 5b. After step 5a (successfully booting to TWRP by holding the power and home buttons down for the correct interval) I actually get an "Unmodified System Partition" screen. There, I have the option of either keeping the system partition read-only, or swiping another option to allow modifications. It is only after either tapping the read-only item or swiping the allow modifications item that I get a subsequent screen where I can tap the Install button (step 5b).
PeteInSequim said:
Once TWRP is installed its pretty easy to use it to install a newer version of it. But getting the boot files prepared on a microSD to boot to this image turned out to be more complicated than my very limited experience could manage (I'm a retired orchardist). The CM-12.1 installation procedure would be greatly improved if I can make this work, but I really need some professional help to make this happen. I keep hoping for a knowledgeable person to come forward.
Click to expand...
Click to collapse
I have a fair amount of experience writing image files to disks/partitions. Does it seem like that's what's needed? I also know how to mount an image file as a looped file system in order to, for example, copy files from it. That's something like what was done with the unrar'ing of CWM and copying files over to the SD card. If any of that experience sounds helpful, I could probably conduct some experiments to see if I could succeed at this. I'm just not sure what the TWRP image file I found is: is it a bootable image? If so, I'm not sure copying files from it to a bootable partition, like you instructed to do for CWM, would work. Writing a bootable image to an SD card should, on the other hand, cause that SD card to become a bootable medium.
In any case, as I said, I could conduct some experiments if it seems like any of my suggestions would be helpful. I'm not really any kind of professional either, btw. I got into computing when I undertook, at a later stage of life, some graduate studies in the humanities, during which I developed the crazy notion that I could somehow gain the upper hand over the machines. That attempt ended in failure, but I have kept up my doomed insurgence and learned some things along the way.
siccoblue said:
I managed to fix it, I had to completely wipe everything as opposed to just a normal reformat and it fixed the issue, but I actually have another problem now, I'm trying to do this on my second nook and when I attempt to flash twrp, cwm recovery now throws me an error on both my tablets, along the lines of "cannot install recovery this was designed for ovation and you are on ." it says that the device is . and won't let me flash it, any ideas?
Click to expand...
Click to collapse
Well, sounds like the zip file you're attempting to flash is mismatched to your model Nook. "designed for ovation" means the zip file is intended for the 9-inch Nook HD+. Are you trying to install on hummingbird, which is the 7-inch Nook HD?
I understand vaguely what you're talking about here, but I'm pretty new to flashing Android devices and find myself wanting to know more. Is there some link you can point me to that explains in greater detail about dirty versus other types of installations? What I'm most interested in learning is how much configuration is too much to permit a dirty install. For example, the tablet is of little use to me if I can't install certain apps on it; will installing apps, for example, obviate the possibility of the sort of dirty install you're speking of?
Click to expand...
Click to collapse
The best explanation I can offer is on page 17 of the instructions. Basically if flashing an incremental CM-12.1 revision a dirty install is fine (no need to wipe the system partition) UNLESS you have altered the user interface with things like theme, colors, wallpaper, boot animation, sounds, etc. If you have, you must wipe both the Data and System partitions.
Or if you are installing an OS version for which the existing one is not a close relative. The most outrageous example of this would be re-installing the old stock Barnes & Noble Android in place of your CM-12.1. Review the information on pages 16 and 17, and I think you'll get a good handle on this.
I've been called to dinner; will address your other questions after that.

[GUIDE] Re-partition your device using REPIT

You might have seen this guide on XDA, but is out-dated and only seems to work on stock firmware. What about people people running CM13, will it work, or will it brick your device?
This guide is updated and works with CM13 tested by me, it was also written with the i9300 16GB model in mind.
FAQ: next post
I take NO responcebility for any bricks, that's on you. Exactly like rooting, or installing anything 3:rd party (right?). Either is is my responsibility if any data is lost.
If you don't follow the guide, and adventure on your own, there's no one to blame but yourself when **** hits the fan.
Now, let's have a look at my partitions before modifying them (kB):
Code:
Filesystem Total Used Available Use% Mounted on
mmcblk0p8 1032088 17732 1014356 2% /cache
mmcblk0p12 11901576 6355436 5546140 53% /data
mmcblk0p12 11901576 6355436 5546140 53% /sdcard
mmcblk0p10 564416 8964 555452 2% /preload
mmcblk0p9 1548144 632704 915440 41% /system
mmcblk0p3 20144 9568 10576 47% /efs
As you can see, stock paritioning is bad. /preload and /cache has a lot of available space which takes up a lot of unnecessary space.
We can minimize all the partitions and use the space to increase your internal storage, neat; let's do it!
1. Check for buggy eMMC chip
First of all we'll be checking if your chip is possible to SDS (sudden death syndrome) which basicly corrupts your eMMC (internal storage) chip.
This only effects the 16GB model, if you're on another model just skip to the flashing part.
A. Download the app eMMC Brickbug Check app from the Play Store.
B. Check eMMC
Check if your device has the following under eMMC chip:
Type: VTU00M
FwRev: 0xF1
If the values match, you should update to the latest ROM + kernel available ASAP, which should fix SDS, if you don't; your eMMC chip might corrupt under the process of flashing REPIT.
2. Flashing guide
A. Before we begin
- Make sure that you're running the latest version of TWRP (i9300, i9305). Any other recovery and the script will NOT work.
- Do NOT continue if you're running stock, or planning to do so. This script is only tested on official CM13.
- Make sure you're plugged into a power source, and not a computer; or else partitions may fail to un-mount.
- Do a backup of your rare cat images so they don't get lost in the worst scenario.
- (optional) If you want to configure the script, see this.
B. Download required tool
We'll be using ourselves with the tool REPIT made by @Lanchon.
Without it I wouldn't make this guide as it is the only(CN) flexible tool for modifying partitions in Android.
Download the required flashable zip file: [updated 2017-01-22]
- i9300 - here
- i9305 - here
Make sure you DON'T rename it; copy it to your device.
C. Boot into recovery - volume up + home button + power button when powered off
D. Flash the zip file
- This process is a really long one, do NOT interrupt the process.
- If the flashing fails, it may tell you that it copied itself to /tmp, navigate to /tmp and flash the script again.
- If x partition fails to un-mount, try un-mounting it via TWRP > Mount.
Inside TWRP navigate to Install > Navigate to saved REPIT and select > Swipe to confirm flash.
3. Done!
You may now restart your device and verify the extra utilized internal storage.
It's not that hard eh? That's because @Lanchon did a great job on his project available on GitHub. Him and I worked closely on #22 to add support for the i9300.
After re-partitioning (still kB):
Code:
Filesystem Total Used Available Use% Mounted on
mmcblk0p8 32240 4200 26404 14% /cache
mmcblk0p12 13457732 574316 12199796 4% /data
mmcblk0p12 13457732 574316 12199796 4% /sdcard
mmcblk0p10 8048 4120 3520 54% /preload
mmcblk0p9 1548144 638168 909976 41% /system
mmcblk0p3 20144 9568 10576 47% /efs
It seems like we've gained 1.5GB in local storage, hoorah! Totally didn't steal from other partitions
Worth it? (my opinion)
Unless you REALLY need that 1.5GB of extra storage; NO, not at all.
On Android 6+ (CM13) sd-cards are now implemented like normal internal storage. Just buy a 8GB micro sd-card which costs a couple of bucks these days and save yourself some trouble.
Not only that, recently a user possibly got SDS (sudden death syndrome, do your own research) after flashing REPIT. Did my own research and I updated the guide with a step to check for this buggy eMMC chip.
Credit:
- @Lanchon for REPIT.
- @forumber2 for original guide.
QnA:
The questions are kinda copied from the old guide.
Q: Why is /cache a large partition?
A: It's because stock software updates saves in the partition. The partition was extended(CN) when upgrading to Android 4.3, as the update was so large, the cache partition had to be as well. AOSP does NOT use the partition when updating.
Q: What is the /preload partition for?
A: It's only really used if you bought the phone locked. Many mobile operators put in extra apps, and bloatware too in the partition only utilized in stock firmware; and even then... There's some random Samsung crap too. REPIT minimizes the partition.
Q: Any consequences of flashing?
A: Yes, you will NOT be able to install stock firmwares (assuming that you're not running stock). A undo is easy as the script is so flexible.
You will also burn a lot of eMMC life cycles using REPIT so don't do it often, and I hope you've read 1. where I covered the buggy eMMC chip thingy.
Q: Something went wrong with flashing the zip file!
A: Please upload the REPIT log usally found in the folder where you placed the flashable zip file to dropbox, or https://paste.tinyw.in; apparently pastebin doesn't like long logs. Can also be in /tmp. Otherwise you can copy the whole TWRP log found in /tmp/recovery.log, /cache/recovery/log or /cache/recovery/last_log. NEVER copy the whole log and make a post out of it, you're spamming the thread by doing so. Issues with REPIT should NOT be reported here, instead go to the REPIT GitHub page here.
Q: I want to undo these changes!
A: Since @Lanchon is taking over this thread :laugh:, ask him. Sorry for me not doing my homework.
Q: How about the x GB model?
A: They all work, REPIT is designed to assign any leftovers to the partition we use.
More questions? Bring them on.
Reserved #2
May be it's better to give proper credits too considering it was a big mess up in past.
Sent from my "i9300/1+2" powered by Carbon/Temasek
Fueled by 7000mAh ZeroLemon Battery
nicesoni_ash said:
May be it's better to give proper credits too considering it was a big mess up in past.
Sent from my "i9300/1+2" powered by Carbon/Temasek
Fueled by 7000mAh ZeroLemon Battery
Click to expand...
Click to collapse
Woops, I made the guide in notepad++, and accedently removed some lines when editing it; including a better credit to @Lanchon; adding in a new one now.
Hawaii_Beach said:
Woops, I made the guide in notepad++, and accedently removed some lines when editing it; including a better credit to @Lanchon; adding in a new one now.
Click to expand...
Click to collapse
I meant in your op too.
Sent from my "i9300/1+2" powered by Carbon/Temasek
Fueled by 7000mAh ZeroLemon Battery
Btw, is it possible to modify this script somehow so that you can reformat the /cache partition to f2fs? Afaik the minimum size is 100mb.
Sincci said:
Btw, is it possible to modify this script somehow so that you can reformat the /cache partition to f2fs? Afaik the minimum size is 100mb.
Click to expand...
Click to collapse
No, I'm sorry. It is already known, on GitHub: #8.
The minimum size of /cache? The script sets /cache to 32240kB which is 32MB..
nicesoni_ash said:
I meant in your op too.
Click to expand...
Click to collapse
OP?
Hawaii_Beach said:
No, I'm sorry. It is already known, on GitHub: #8.
The minimum size of /cache? The script sets /cache to 32240kB which is 32MB..
Click to expand...
Click to collapse
After I read your conversation with @Lanchon on git, it seems to me that there is no need to wipe data and it will still work, it's that right?
OP - Original Post basically referred to first post.
Sent from my "i9300/1+2" powered by Carbon/Temasek
Fueled by 7000mAh ZeroLemon Battery
nicesoni_ash said:
After I read your conversation with @Lanchon on git, it seems to me that there is no need to wipe data and it will still work, it's that right?
OP - Original Post basically referred to first post.
Click to expand...
Click to collapse
Yes, you don't need to wipe /data. It just makes things faster; as you wont have to move the content around. Without wiping, it will take a longer time to re-partition.
The script will NOT wipe /data except you add +wipe to -data=max (-data=max+wipe-i9300)
OP has so many meanings, it's f***ed.
Hawaii_Beach said:
On Android 6+ (CM13) sd-cards are now implemented like normal internal storage. Just buy a 8GB micro sd-card which basicly costs a couple of bucks and save yourself some trouble.
Click to expand...
Click to collapse
hi, thanks for the guide!
actually, the external sdcard will always be slower than the internal eMMC. also, the extra free space gets auto-TRIMmed in /data, making the whole eMMC (and thus your phone) faster. also, adopted storage diminishes the total reliability of your phone and data (more devices can fail).
in all, i'd recommend anybody with less than 2 or 3GB free space in /data to REPIT; it's safe and easy.
---------- Post added at 05:35 PM ---------- Previous post was at 05:22 PM ----------
Sincci said:
Btw, is it possible to modify this script somehow so that you can reformat the /cache partition to f2fs? Afaik the minimum size is 100mb.
Click to expand...
Click to collapse
REPIT does not support f2fs for now.
(future support will not include wipe without resizing, as f2fs does not support that yet.)
but you can get what you want anyway:
"-cache=0.03125+wipe"
actually means
"-cache=0.03125+wipe+ext4"
given that ext4 is the default FS for "cache".
"wipe" means format, and never mind what was there before. even if it was something that wasn't ext4 at all, it will succeed.
so you can use:
"-cache=0.0976+wipe"
to get exactly 100MiB-sized cache (in ext4)
then, afterwards, use TWRP to format cache in F2FS
and you'd get what you want.
but...
DON'T!!!
dont use F2FS in ANY partition besides /data! it makes NO sense!
F2FS has an overhead of about 100MB, so basically you would be creating a /cache that is unable to hold any files at all. (ext4 has 5MB overhead.)
and why have a dysfunctional /cache? what for? to have problems? incompatibilities?
certainly not performance, because cache is NEVER used in android. so why do it?
it's soft of a crazy fad, like /system in f2fs.
/system, the one partition we never write to, lol
---------- Post added at 05:39 PM ---------- Previous post was at 05:35 PM ----------
nicesoni_ash said:
May be it's better to give proper credits too considering it was a big mess up in past.
Sent from my "i9300/1+2" powered by Carbon/Temasek
Fueled by 7000mAh ZeroLemon Battery
Click to expand...
Click to collapse
thanks!
no credit required!!! the GPL allows him to do as he pleases, as long as he doesn't remove the license or claims copyright.
but anyway, thanks for the credit appreciated!
and thanks for invaluable help to port to i9300!!
---------- Post added at 05:43 PM ---------- Previous post was at 05:39 PM ----------
btw, i should start thanking the people who helped with the ports in the comments of the device port file. so far 2. i will back-credit when i get the time.
and i9305 and others are probably trivially supported, i just need the dumps done.
Lanchon said:
really long stuff going on
Click to expand...
Click to collapse
The thing is that not only could REPIT be ported to i9300, but any other Samsung device, right? They all run TouchWiz; for example s4, s5, s6? Have anyone even checked partitions on those devices?
The thing with partitions and the Android community is that almost no one discusses it. If you do a google on partitions on Android; very Little information / threads exist.
Lanchon said:
hi, thanks for the guide!
actually, the external sdcard will always be slower than the internal eMMC. also, the extra free space gets auto-TRIMmed in /data, making the whole eMMC (and thus your phone) faster. also, adopted storage diminishes the total reliability of your phone and data (more devices can fail).
in all, i'd recommend anybody with less than 2 or 3GB free space in /data to REPIT; it's safe and easy
Click to expand...
Click to collapse
To be honest, I never cared about storage speed (same goes for trim), not a heavy user on my phone, and have never been, just doesn't go well when I'm the operator. As long as it doesn't take 1 year to copy my secret .mp4's (ransom.mp4 and many more), there's no worries.
About failure, it's like running a computer. If you shut down a computer without sending signals (unplug from wall etc), it may damage the harddrive; right? Same here. Right?
Any how, If I ever run out of space on my i9300, I'd just add a sd-card. I don't save anything important on my device that doesn't get backed up via TWRP. But..
that's never going to happen! Because my OnePlus One is coming back from RMA service! (finally after 4 months (not kidding)). kinda off topic, but hey; it's my thread right :good:
Hawaii_Beach said:
The thing is that not only could REPIT be ported to i9300, but any other Samsung device, right? They all run TouchWiz; for example s4, s5, s6? Have anyone even checked partitions on those devices?
The thing with partitions and the Android community is that almost no one discusses it. If you do a google on partitions on Android; very Little information / threads exist.
Click to expand...
Click to collapse
lol about the quote
besides the name playing on samsung's PIT files, REPIT can actually work on any device with TWRP support. but the partition layout in most newer devices is friendly enough not to bother. even the stock i9300 layout is sort of friendly. highly problematic are only the devices that shipped before ICS with android 2.x (galaxy S2) or devices that shipped with non-emulated internal sdcard.
discussion is low volume because partitioning is considered 'dangerous'. and it can be, you can brick if you mess up. the idea of REPIT was to make it safe by encapsulating a bit of knowledge of each device in the device port file. motivation was that S2 users suddenly all needed to repit: their devices stopped working after a nightly flash because of /system being too small, it was a mess, lol.
btw, since you asked before, that's the reason why porting is needed: because you can't trust users not to make mistakes with full freedom. users that want full freedom have other tools: gdisk, parted, mkfs.xxx, resize2fs, etc.
Lanchon said:
lol ab...
Click to expand...
Click to collapse
Yeah, I know that other devices doesn't even need to touch the partitions, as it is a waste of time. (so is this??)
edit: still, maybe I want a extra 1.5gb on my s6 Active or whatever.
edit: by for today, it's 00:00 here..
discussion is low volume because partitioning is considered 'dangerous'. and it can be, you can brick if you mess up. the idea of REPIT was to make it safe by encapsulating a bit of knowledge of each device in the device port file. motivation was that S2 users suddenly all needed to repit: their devices stopped working after a nightly flash because of /system being too small, it was a mess, lol.
Click to expand...
Click to collapse
Dangerous!? I've seen way more people fu** their IMEI number (including ME on MINE i9300) by doing something dumb to the /efs content (totally didn't try to unlock the phone), that's dangerous. (got 0049)
The phone was just lying round until I got around to fix it, not going to get into details as XDA doesn't allow this stuff. It was really fustrating as people said that reflashing stock would get back the IMEI (should apparantly work, etc etc).
yet again side tracked, but i'm the operator right? :good: :highfive:
@Lanchon
Since we are talking abt partitions, I would like to ask a question that's not related to this tool but the other way mentioned in first post by flashing a zip file with manually entering the size in script file.
I tried that a while back on my s3 and it worked great. I was on kitkat that time and it was fine till lollipop came. So I flashed lollipop but since the system size was only about 500mb, it failed to flash so I made another zip with system size to 800mb and flashed it again. Although everything went fine but after flashing a new rom or restoring my old backup phone always showed some encryption error and asked to factory reset and even after doing that, still showed the same error even though I never encrypted anything. So the only option was to flash stock with pit file and change the partitions to stock size and then restore or flash a new rom.
I was never able to partition my phone after that coz that error always came back. I have op2 now so all molding goes on it and s3 is like a backup phone but I am still interested to know what was that all about and what could I do to fix that or whether my emmc worn out?
Sent from my "i9300/1+2" powered by Carbon/Temasek
Fueled by 7000mAh ZeroLemon Battery
Hawaii_Beach said:
Dangerous!? I've seen way more people fu** their IMEI number (including ME on MINE i9300) by doing something dumb to the /efs content (totally didn't try to unlock the phone), that's dangerous. (got 0049)
The phone was just lying round until I got around to fix it, not going to get into details as XDA doesn't allow this stuff. It was really fustrating as people said that reflashing stock would get back the IMEI (should apparantly work, etc etc).
yet again side tracked, but i'm the operator right? :good: :highfive:
Click to expand...
Click to collapse
well... effing the bootloader i way worse than borking /efs, believe me.
now, trying to hack /efs WITHOUT A BACKUP (!!) is big jesus f*cking christ sh*t u talking lol!!!
Lanchon said:
well... effing the bootloader i way worse than borking /efs, believe me.
now, trying to hack /efs WITHOUT A BACKUP (!!) is big jesus f*cking christ sh*t u talking lol!!!
Click to expand...
Click to collapse
Hahahaha yep. Didn't know the risk dude.
nicesoni_ash said:
@Lanchon
Since we are talking abt partitions, I would like to ask a question that's not related to this tool but the other way mentioned in first post by flashing a zip file with manually entering the size in script file.
I tried that a while back on my s3 and it worked great. I was on kitkat that time and it was fine till lollipop came. So I flashed lollipop but since the system size was only about 500mb, it failed to flash so I made another zip with system size to 800mb and flashed it again. Although everything went fine but after flashing a new rom or restoring my old backup phone always showed some encryption error and asked to factory reset and even after doing that, still showed the same error even though I never encrypted anything. So the only option was to flash stock with pit file and change the partitions to stock size and then restore or flash a new rom.
I was never able to partition my phone after that coz that error always came back. I have op2 now so all molding goes on it and s3 is like a backup phone but I am still interested to know what was that all about and what could I do to fix that or whether my emmc worn out?
Sent from my "i9300/1+2" powered by Carbon/Temasek
Fueled by 7000mAh ZeroLemon Battery
Click to expand...
Click to collapse
well i cannot answer about scripts and procedures unknown to me but...
an encrypted disk typically is made of 2 things:
-the encrypted disk 'surface' or area (ie: the data)
-and metadata (data describing the data, ie: data describing the encrypted disk)
metadata typically contains:
-cipher info
-and the disk surface encryption key (generated at random), itself encrypted with the access key (such as a passphrase).
why the indirect key? without it:
-changing the passphrase (say, your phone lock pattern) would be a very dangerous operation that would require reading, reencrypting and writing the complete disk, would take a huge amount of time and would drain your battery completely
-erasing the disk would similarly take a long time.
with it:
-when changing the passphrase you just need to reencrypt the surface key with the new passphrase and rewrite the metadata.
-when erasing, just wipe the metadata.
for example the metadata in recent android phones with hardware backing store for keys probably contains:
-cipher info
-and the disk surface encryption key (generated at random), itself encrypted with a secondary key (also random).
the secondary key lives in the hardware keystore. it's generated there and can never leave that processor. the keystore will decrypt the surface key during boot, only if the main processor informs the right passphrase (say, the PIN or pattern). a 4-digit PIN would be very easy to bruteforce, except that the keystore throttles down guesses, and can even wipe the key (rendering the disk forever unreadable) after so many bad guesses.
the keystore should be tamper-proof: a silly small processor, but resistant to voltage spike attacks, rays, etc and decapping to read the storage, to pick up signals in traces, to inject signals in traces, to chip modifications, etc. think of it as the chip in any recent credit card or even some sim cards, but on the main circuit board.
anyway back to metadata in android: it needs to be stored somewhere. the obvious place is an ultra small metadata partition containing just the raw metadata, no file system or anything of the like. this is simple and works great, except for one detail: older phones don't have this partition. basically this means that an android upgrade couldn't give you encryption.
so android can use a "crypto footer": with this scheme the encryptable partition (say /data) has a file system that is 16KiByte short of filling the actual partition, and the 16KiB footer follows. the footer is the metadata.
when you repartitioned before, you probably created a file system that used the complete partition area. there was no space left for the footer, so encryption couldn't be enabled.
you could have solved your issue today by flashing repit with all-default parameters: repit always resizes the encryptable partition's file system to make room for the footer, if not already there.
in REPIT, these commits add general and ext4-particular support for crypto footers:
https://github.com/Lanchon/REPIT/commit/591961adb180a6a03594053a846b698240b4d507
https://github.com/Lanchon/REPIT/commit/de3d3af9813afef7de3a798ce5314c0fb210e30f
https://github.com/Lanchon/REPIT/commit/5c3360b572ff25c7c01d796cabb9400066451ec3
this configures the footer on the i9300:
https://github.com/Lanchon/REPIT/blob/f46b0aafdfeb7860be17a315b4aceb43966325f9/device/i9300.sh#L85

Categories

Resources