yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 Mini Android Development] dulemars:
First, big thanks to [MENTION=5280400]ne0zone75[/MENTION], I can confirm that everything encryption/dectyption related works as a charm in newest build :D You are right, now I see it was an input problem, in one of the posts I've mentioned that when I try to enter decryption password it seems to me that wrong keys are gettting pressed, and now it all makes sense.

Add f2fs support and my wishlist will officially become empty :)

As of encryption/decryption question by [MENTION=5786498]smartxdev[/MENTION], here's how it works (at least I hope so):

Encryption is on a filesystem level, so encrypted partition has a header that says "I'm encrypted" followed by encrypted data. So when you use some ROM to encrypt device, then wipe that ROM, your phone is still encrypted. Boot into TRWP and it will recognize encrypted filesystem, ask for password, and decrypt it, even in case when partitions contain no data. Then you can install any ROM on your phone and system will still be encrypted (but, if that new ROM lacks proper encryption support in its kernel, it will be unable to boot). To really remove encryption you need to repartition your phone completely using Odin or Heimdall with your PIT backup.

This comes handy if you wish to bypass PIN/password requirement for lockscreen when your phone is encrypted. Install ROM, encrypt phone, then boot into recovery, and install the same ROM again from scratch. Phone will still be encrypted, but new ROM will act like "hey, I never did encryption" although it shows that phone is encrypted so it will allow you to use pattern lock for example :P

Similar goes for encrypted backups, once TWRP opens them it notices encryption, asks for password, decrypts them, and then you can restore those whenever you want, to encrypted phone or to non-encrypted phone, it makes no difference. It's not coupled to phone encryption by any means, for example, you can make encrypted backups of non-encrypted phone and vice versa.
[Galaxy S 4 Mini Android Development] ne0zone75:
[MENTION=5786498]smartxdev[/MENTION]

Hello and good morning,

If you have to wipe ALL partitions of your device, the process will be longer but basically the same as the one i am suggesting you at the end of this post : BE AWARE THAT WIPING EVERY PARTITION OF YOUR DEVICE IS POTENTIALLY VERY RISKY -> just wipe every partition you NEED to... (be very carefull about keeping the download mode OK...)

By formatting /data, you will loose /data itself and /data/media (your internal storage) because the 'internal storage' partition is a virtual one and is stored on physical /data partiton (which contains two logical ones AFAIK...); it will not affect microSD !

Now, a basic principle with encryption is that the partition that you will encrypt needs to be at least formatted (in fact it should be shredded...).

My opinion on your request is that you should :

-> ever backup sensitive data by encrypting it ! (store it on your microSD, then place a safe copy elsewhere outside of your phone...)

-> when upgrading CM, or recovering from a 'wipe it all' the basic process is for me the same to be : always format /data then wipe ALL the partitions that you think have to be wiped !

-> flash CM, GAPPS then boot straight to system : at this point there is no encryption at all !

-> encrypt your device from Android and when done reboot to recovery, decrypt your newly encrypted /data partition and restore ONLY /data from the NANDROID backup of your choice (the last working one...).

-> finally reboot to system, every settings + APPS will be there !

Now, if i were you, i would :

-> always keep the last working NANDROID backup (clean of any kind of data corruption...) in a safe location...

-> consider flashing some script to tune your /data filesystem by setting 'data journaling' ON -> in case of improper shutdown of your device it may help to prevent /data to become corrupted...

-> stay away of any kind of custom kernel : and if you are using one, i think you should not play with any settings at all but run it to default ones (so you can have enhanced features over CM one without introducing some kind of system instability...)

Good luck... ;)

... and Best regards :D
[Galaxy S 4 Mini Android Development] ne0zone75:
Well, first of all, i would like to thank about having done such a detailed 'crypto' review of my latest TWRP build... it's really interesting ! :good: and i am glad that everything is working as intented ;)

Now, there is maybe a misunderstanding on my side about how CyanogenMod (let's say Android...) is encrypting a device :

-> if it encrypts only /data : then that is what i was thinking and the backup/restore procedure i wrote down in my previous post can be applied...

-> if it encrypts the whole device (then only /boot is unencrypted in order to be able to load kernel ramdisk with 'crypto' modules...) like it can be the case in Linux full disk encryption, then my backup/restore procedure must not be applied...

FYI i do not use encryption at all in Android that is why i am maybe misunderstanding the way it works with it... but i do have some basic knowledge on it with Linux ;)

So, i can confirm what has been said previously by [MENTION=4940125]dulemars[/MENTION] and yourself if where are talking about full device encryption... as long as the kernel used by the recovery supports 'crypto' and a correct password is provided to decrypt your device's partitions, then you can safely and securely operate any backup/restore processes from recovery.

That is why i do think that your procedure below seems to be safely and securely applied :

... but as said above i'm not a 'crypto' expert... ;)

Regarding turning 'data journaling' ON for /data : i do think it would be helpful in your case to raise 'improper shutdown tolerance' a little bit... and don't hesitate to PM me about it if you want to of course :D

PS : ... and yes ! [MENTION=3261191]F4k[/MENTION] f4ktion kernel supports 'crypto' and is really amazing :good: ;)

Sent from my TF701T
[Galaxy S 4 Mini Android Development] smartxdev:
Great, I think we're settling down on this one ! :victory:

Even though, it does seems to me that mainly /data is encrypted, and other partitions may or may not be so,

from all the claims made here, I don't see any risk with my setup in either case.

Data journaling - I've looked it up a bit, but I'm drifting everyone off-topic enough already, so [MENTION=5280400]ne0zone75[/MENTION], see PM on this one ;).

Thanks everyone for the assistance on the recent issues :good:.

And I hope occasional flag mistakes won't slip in on next releases, since I really doubt that I'll have the energy/time to test this extensively next time :p.
[Galaxy S 4 Mini Android Development] smartxdev:
Hi!

Just something I've noticed recently, hard even to call it a bug, but anyways:

When creating a backup, the terminal 'window' in TWRP reports estimated backup size twice:

- once before: "Total size of all data: #### MB"

- and once after backing up: "[#### MB TOTAL BACKED UP]"

Well, the first size report the is legitimate, but the post-backup report shows always:

.....
[0 MB TOTAL BACKED UP]
Updating partition details...
[BACKUP COMPLETED IN ### SECONDS]

It's always 0 MB.

Also, When I was doing backups 2 versions ago, it worked fine. But since then, the backups become much larger, so it either recently introduced bug or it may be bounded to some numerical limit, and has always been there.

Anyways, the issue is rather very minor, since the backups themselves are perfectly OK, it seems just UI to me.

Just so you know.
[Galaxy S 4 Mini Android Development] denon480:
Hi, in recovery mode i cant mount it to my PC, i use total commander+Android ADB

In cwm 6.0.4.8 and this TWRP is work fine http://xdaforums.com/showthread.php?t=2589011

fix please
[Galaxy S 4 Mini Android Development] ne0zone75:
Good evening, i will look at it as soon as i can...

Regards

Sent from my GT-I9195
[Galaxy S 4 Mini Android Development] ne0zone75:
Hi, this bug does not occur for me when performing non encrypted backups... are you still making backups that way ? If so, then this small issue is probably related to encrypted backups ONLY ;) I will give a closer look at it ASAP...

Hello, i am working on it ATM and i can confirm that the device is not listed when issuing 'sudo adb devices' from a Linux terminal... :confused:

Be well and stay tuned :D
[Galaxy S 4 Mini Android Development] smartxdev:
For me once it started to be this way couple of weeks ago, and it just always 0MB since then: encrypted, unencrypted, compressed or not.

I'ts not tied to backup type, nor to the system encryption. It started when I didn't used encryption at all.

But, again, backup/restore/install zip/encryption works, and that's what important. I don't care much of this bug, and if digging it too deep may mess stuff up, maybe it's best left alone. If no one else is having this issue, maybe it's somehow tied to my device...

Anyway, it's weird, but not critical.

I'm not sure if this is related to the issue you (and [MENTION=5165116]denon480[/MENTION]) are talking about, but:

Few days ago I've experimented some stuff with adb, and I had issues with ADB access in recovery.

The trick for me was to enable/disable ADB sideload in recovery after connecting to USB, than I could access the device in ADB.

Though I failed to get root access in ADB while in recovery no mater what, but I was sure that that was me doing something wrong...
[Galaxy S 4 Mini Android Development] ladislav.heller:
Hi!

Is it possible to make this recovery OFFICIAL and also downloadable/flashable by the TWRP Manager application?
[Galaxy S 4 Mini Android Development] ne0zone75:
Well... you are providing very useful feedback... again ! :good:

I already had noticed the 'adb sideload' trick... thanks for confirming it ;) But since the device should show up directly through USB and that it is not the case ATM... i think that i will investigate on this a little bit...

You can be sure that 'crypto' flags are stored in a safe place. ;)

I do agree with you about the minor issue you reported back some time ago and i am not planning to work on it at all...

BTW, all incoming updates for both branches of each device will be compiled along with CyanogenMod 11.0 sources tree with [MENTION=5161352]JustArchi[/MENTION] Linaro GCC toolchains 4.7 :good:

Happy Sunday to every one of you !

Sent from my GT-I9195
[Galaxy S 4 Mini Android Development] smartxdev:
Thanks!

Yeah, that's my concerns in the background, you definitely understand the point :) Glad to hear this :good:
[Galaxy S 4 Mini Android Development] ne0zone75:
Hi ! :D

Yes ! It can be done BUT i does not depend on me at all as you might have already guessed ;) There is a link on official TeamWin Website for such request...

Also, i think that there is still room for some improvements before proceeding...

Finally, i really do not know if there is a single chance for this to happen one day because if TeamWin TEAM has not already built any version of TWRP for GT-I9195/0, there is obviously a reason to that... which i, as every one of you, do not know ;)

Best regards
[Galaxy S 4 Mini Android Development] ladislav.heller:
Reason can be: Nobody asked them yet to build TWRP for serrano3gxx and serranoltexx :)
[Galaxy S 4 Mini Android Development] smartxdev:
Talking about the official Team Win, I've noticed that according their GitHub page, they'd stop committing in 2013.

Is it really so?

..Luckily, we still have some volunteer devs (as ne0zone75 ;)), working on the Recovery and tuning it for our devices :good:.

But anyways, [MENTION=5280400]ne0zone75[/MENTION], when you say that you include upstream merged commits in every new release, which branch are you merging with? Is it any of the branches seen in the GitHub link above?
[Galaxy S 4 Mini Android Development] ne0zone75:
HI, TWRP is under heavy development, thanks to [MENTION=912474]Dees_Troy[/MENTION] and to the whole TeamWin TEAM for this :good:

AFAIK, the GitHub repository that i am using for my builds is the most up to date one : OmniROM TEAM one ;)

Best regards

Sent from my GT-I9195
[Galaxy S 4 Mini Android Development] eNickr:
Thank you!

I liked a lot the new update. I used to have the clockworkmod but wasn't working fine. Now everything is ok.

Thank you!

also for release the changelog :D:D:D:D:good::good::good:
[Galaxy S 4 Mini Android Development] stefanson:
Yes, all seven.

I proceeded now as advised:

* Formatted all partitions

* Restored all 7 partitions

* Formatted the cache and dalvic cache partitions afterwards

I still get FC (Force Closed) errors with the Samsung FW, so something seems to be corrupt here. The CM 13.0 back up works absolutely faultless.

Thanks!
[Galaxy S 4 Mini Android Development] tyby1601:
Hello.

I tried to flash TWRP v3.0.2 on my I9195.

I follow the instruction on OP, odin shows the complete mesage but when i enter in recovery mode it apears the stock one.

Any help, please

Trimis de pe al meu Nexus 7 folosind Tapatalk
[Galaxy S 4 Mini Android Development] KevinX8:
If you are on stock ROM the recovery is only temporary and you have to reboot to ir immediately if you want to use it
[Galaxy S 4 Mini Android Development] tyby1601:
Yes, i am on stock ROM.

I do not understand what i have to do...

After flash with odin i closed the phone, open, close again end enter in recovery mode. But the recovery was the stock recovery...

Trimis de pe al meu Nexus 7 folosind Tapatalk
[Galaxy S 4 Mini Android Development] tet-bundy:
The moment odin states "passed" press power+vol down+home. Worked for me.

Gesendet von meinem SM-G800F mit Tapatalk
[Galaxy S 4 Mini Android Development] ne0zone75:
Yes ! It is unusual but it seems that something went wrong with your stock FW backup. If it is not your '/data' partition backup that is wrong, restoring your stock FW through 'Odin' (SAMMOBILE) and then restoring your '/data' partition backup by ending with wiping 'cache' + 'dalvik cache' should let you go back to stock FW successfully if you need to...

Hi,

If you got a green "success" flashing notification message in 'Odin' after having used the 'AP' flashing mode with correct flashing parameters AND if you are not booting in TWRP afterwards, then do it one more time BUT when the flashing process is done AND when your device starts to vibrate just before rebooting THEN press and hold the 'VOL. UP' button of your phone in order to boot straightly into recovery mode instead of booting into system : this last step is sometimes required for some devices to achieve successfully the flashing process (if pressing and holding ONLY 'VOL. UP' button does not work, then try to press and hold 'VOL. UP' + HOME buttons).

I will add these instructions to OP ASAP...

Let me know if this helped
[Galaxy S 4 Mini Android Development] tyby1601:
Yes, i did it.

That was the trick. After odin says ok boot directly in recovery mode.

Tkaks for help to al 3 of you.

Trimis de pe al meu Nexus 7 folosind Tapatalk
[Galaxy S 4 Mini Android Development] ne0zone75:
v3.0.2-1 TRYOUTs have been flagged as STABLE and will be removed from AFH servers soon...

Opening post has been updated accordingly and quick Odin flashing instructions have been added to OP (thanks [MENTION=3044346]arco68[/MENTION]).

Downloads tab has also been updated with v3.0.2-1 and v3.0.2-0 has been removed from it.

Finally, TWRP changelog for v3.x.x-x has been added to post #2 (taken from official TeamWin website).

Have a nice day

Tapatalked from my SM-G903F
[Galaxy S 4 Mini Android Development] jimbomodder:
This is the only thread I now follow for my son's s4 mini and I'm glad to see it's still getting supported. :thumbup:

Sent from my SM-A500FU
[Galaxy S 4 Mini Android Development] gulfand:
Hello everyone,

I have been reading many posts and guides to unbrick my i-9195. A bit of history, it could not start, "Samsung S4 mini" when I switch on, impossible to load android, so I tried to start flashing and making mistake. Best is to show you the screen when I switch on the phone after various attempt to flash. First Cwm was flashed and then I've tried with twrp but nothing. I don't know what to do. After I flash the twrp and reboot in recovery mode, I can see it tries to open twrp but then it reboots. Any idea what I can do? I have literally tried everything, I am not really expert. I can see write protection enabled, bootloader 2, know warranty void 0x1, so I think it is not that easy for me. I would come back to stock firmware but I don't know which one I can flash. The phone is from Three italian, the stock firmware downloaded from Sammobile doesn't work. Thank you in advance
[Galaxy S 4 Mini Android Development] jimbomodder:
Are you using latest odin? That can plan a big part, also at which point does odin fail as that might help us better in helping you to fix it.

Sent from my SM-A500FU
[Galaxy S 4 Mini Android Development] gulfand:
Thank you jimbomodder. I have used odin 3.09 and everything seemed working well, pass is green at the end and success 1/ failed 0 so it looks like flashing has been succesful. Kies and all rrlated processes had been closed before. I don't know the csc, modem and other details because I cannot go into settings so maybe the rom I am trying to flash is not the right one. Conflict between cwm and twrp could the reason? Both when I switch on in recovery mode got stuck and phone reboots. Could the write protection be the reason of the bad flashing?
[Galaxy S 4 Mini Android Development] jimbomodder:
Not really, my son's is same, once flashed boot to recovery and do a factory reset and wipe cache, then reboot back to download and flash again, Samsung's need 2-3 flash's before anything sticks and all other issues erased.

Sent from my SM-A500FU
[Galaxy S 4 Mini Android Development] gulfand:
The problem is that once flashed I cannot boot to recovery and do wipes because it gets stuck while rebooting in recovery and I cannot reach the menus. What can I do? Amy problems with the bootloader or recovery? Or the rom? Or any blocks from the phone? Have you got a step-to-step guide to unbrick or reflash with factory rom and loader? Or should I try to load cmw or twrp in a different way? They both do not load when I flash them. Thank you
[Galaxy S 4 Mini Android Development] ne0zone75:
Hello,

What is your last good known ROM setup : stock or custom ? Anyway, i think that the best way to go through this is to :

properly choose the right stock FW from SAMMOBILE : filter results for your device by country, then choose the most recent one that matches your device carrier (from which it has been bought) and flash it using 'Odin' (i do recommend to download and use the 'Odin' version which is available from SAMMOBILE too); do not pay attention to 'PDA' and 'CSC' version numbers...

when stock FW is flashed, see if it is booting...

if it is not booting, leave your device as is and connected to your PC AND try an 'emergency firmware recovery' from 'Kies'...

If you flash the right stock FW for your device, it should work...

Good luck
[Galaxy S 4 Mini Android Development] gulfand:
Thanks ne0zone75. I had problems with the stock rom, phone could not reboot l, then I tried to flash another stock rom but didn't work. Than I flash cwm but could not load in recovery mode. I tried with twrp but same problem. I tried flashing stock roms with odin but when rebooting I could not do wipes. This evening I'll try your way, fingers crossed. Thank you
[Galaxy S 4 Mini Android Development] gulfand:
Nothing new, I've tried many many times, download the latest Odin from Sammobile website with the latest firmware for gt-i9195 Tre Italy HUI (I9195XXUCOI4_I9195HUICOJ1_I9195XXUCOI4_HOME.tar.md5). Flashing process went through, passed, antivirus, firewall and windows firewall all disabled, the flash was done and confirmed as passed. Right after flashing, I've tried to load in recovery mode with volume up, to make wipes but nothing, I see the Android logo and it reboots. Tried several times to reflash, and then trying to enter in recovery but I cannot reach the menus for wipes. I think I need something deeper as a normal flash or a new loader. But cwm and twrp could not load as well, I have some deeper problem. Would you suggest PIT or other guides?

Connected to try to do recovery with emergency firmware but Kies cannot recognize the phone and see the features.

Should I give up or try other ways? Thank you.
[Galaxy S 4 Mini Android Development] ne0zone75:
IMO you should open a new thread to ask for assistance from the whole community. Describe your issue precisely from the starting point to the present situation.

It is weird that flashing the correct FW from SAMMOBILE did not help...

It is also weird that the recoveries that you installed were not booting either because everything needed to run them is stored inside the 'recovery' partition...

I think that nothing is lost yet but it is beyond my knowledge,

Good luck

Tapatalked from my SM-G903F
[Galaxy S 4 Mini Android Development] tioguda:
Hi friend

Look if this video helps you in something.

https://www.youtube.com/watch?v=_EldbDI-hkk
[Galaxy S 4 Mini Android Development] IronRoo:
[MENTION=5280400]ne0zone75[/MENTION] Thanks for this TWRP recovery for i9195, great UI and even better it works! (despite me missing the initial boot into recovery after flashing, so my phone is obviously is one that does not need to (on std CM12.1 ROM & Kernal with CWM recovery 6.0.5.1))

One point worth noting is when I did a full backup of all partitions (it said 8) the progress bar showed as expected but then it actually went to 101%, the progress bar disappeared and the only button showing was "cancel", and it appeared stuck at the last stage. I searched this forum but no mention of this so thought I was going to have to tap "cancel", but a second before I was going to tap it, it suddenly showed a few more lines of progress (checking partition or something) and then the cancel button was replaced by two buttons to "return" & "reboot" (I think) which was when backup had really finished. So people do NOT hit the cancel button after a backup just wait a couple of minutes and you can reboot!
[Galaxy S 4 Mini Android Development] glkanth77:
Yep that's correct we have to wait until the process completed have u tried to restore the backup
[Galaxy S 4 Mini Android Development] KyeWalker:
TWRP v3.0.2-1 works like a charm mate. Thank you so much for your work on our devices ;)
[Galaxy S 4 Mini Android Development] yannik~:
Hi, where can I find the sources/build instructions for this? I couldn't find a github link in the OP.
[Galaxy S 4 Mini Android Development] KyeWalker:
Check TWRP website
[Galaxy S 4 Mini Android Development] warcloudz:
can work on i257m?

hi, im new

just want to know if it works with s4 mini i257m ?

coz i want to get custom rom but all i see is for other variants and get custom recovery first.

anyone can help me with my device? its rooted via cf auto auto root via odin, and i dont know what to do next XD
[Galaxy S 4 Mini Android Development] ne0zone75:
I will do my best to upload my sources to GitHub this summer. If you are interested in building TWRP for S4 mini now, you can check [MENTION=912474]Dees_Troy[/MENTION] official TWRP DEV thread and use the method of your choice to compile it. Of course, my TWRP build flags will be missing... i will be happy to share them with you if you need them...

Like [MENTION=3044346]arco68[/MENTION] said some time ago, the I257m variant is identical to the I9195 one. Simply grab my latest 'Odin ready' package for I9195 and flash it to your device.

Regards

Tapatalked from my SM-G903F
[Galaxy S 4 Mini Android Development] gfogger:
Hmmm, Androidfilehost is down?

Can somebody upload or give me a link for the recovery-zip:

custom TWRP v3.0.2-1 MM enabled for S4 mini (LTE variant) | STABLE (2016-04-13)

Pleaze :)
[Galaxy S 4 Mini Android Development] ne0zone75:
Files are also available from the downloads tab of my project.

Tapatalked from my SM-G903F
[Galaxy S 4 Mini Android Development] warcloudz:
Thank you for replying ! So basically i can get custom roms for l9195 for my I257m? Am I right? Hehe