[TOOL/UTILITY][TWRP][3.2][RECOVERY] TWRP 3.2.1-0 TeamWin Recovery Project

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
Hi, can u explain what was the reason of non working external exfat sd on P900 and how did you fix it? Was it caused by enforcing selinux or was there any other reason?
Btw did u check if it is working on fat32(vfat) externsl sds? I bet it does.
If selinux is enforcing it won't allow you to backup to the external sdcard. I had to turn it off in the kernel command line.
 

esgie

Senior Member
Feb 17, 2013
333
176
43
Hm.
1) FAT32 cards seem to work ok with custom recovery (see pt. 2) on P905's even if enforcing... enforcing causes lack of permissions only to exFat cards (and probably ext4 ones, didn't check that...)

2) As probably not many of you noticed, I've posted custom TWRP for P905 which IS WORKING and IS USABLE. Let me remind, it's not exactly my job, Ive made it by combining:
a. repacking stock (pre-compiled but working!) kernel zImage with...
b. ...TWRP's ramdisk...
c. ...with some device-specific changes.
I am using it since three weeks, backing up and restoring works great, I can go further with exploring the device without a worry, that I'll have to start from ODIN stock again and again after any failure... Cache wiping seem to work too. The only issue is that goddamn enforcing thing, but I have avoided the problem by performing backups to different, FAT32 formatted external card (16GB sd even from a trusted company seem to be extremely cheap nowadays...) than I use everyday... just a matter of swapping the cards, which seems to be enough for a moment until someone smarter succeed to compile the regular working version... Backup, even 8gb with compression, is being performed very quickly (and correctly!) as N12.2 has great speed of intrernal mem... Zips also install correctly etc.

Reminding, here''s link for "latest" version of "homemade" TWRP 2.7 for P905 working with FAT32 externals:
http://www30.zippyshare.com/v/98456819/file.html

You can flash it if you are rooted by Chainfire's method, by placing twrp.img in the /sdcard folder and have busybox installed (if you can't, use one of the GUI apps from GPlay...), by turning on Terminal Emulator app and typing:
su -c busybox dd if=/sdcard/twrp.img of=/dev/block/mmcblk0p15

P905 only! And don't mistake the last number as you'll flash image to wrong partition which may and surely will result in a brick, sometimes: unrecoverable with Odin...
I haven't ever prepared odin tar's in my life, so if someone can do it instead to ease up the process it would be nice.

3) Maybe there's a workaround which may be used in ie. P905 (which kernel, as far as I understand, don't want to compile in a working way until now, right) to make external card writable ? Example: as of regular android, external card write access can be enabled for everyone by modding /system/etc/permissions/platform.xml - I've made it and it works, at least from within the system. However, I do not know if that file is /system/etc/permissions/platform.xml (or any other describing the permissions) is android specific and it won't work/won't be even loaded or seen under revcovery, or is it a part of SELinux/UNIX/whatever and it will be respected... How do you think?
 
  • Like
Reactions: RaSand and DenisIam

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
Hm.
1) FAT32 cards seem to work ok with custom recovery (see pt. 2) on P905's even if enforcing... enforcing causes lack of permissions only to exFat cards (and probably ext4 ones, didn't check that...)

2) As probably not many of you noticed, I've posted custom TWRP for P905 which IS WORKING and IS USABLE. Let me remind, it's not exactly my job, Ive made it by combining:
a. repacking stock (pre-compiled but working!) kernel zImage with...
b. ...TWRP's ramdisk...
c. ...with some device-specific changes.
I am using it since three weeks, backing up and restoring works great, I can go further with exploring the device without a worry, that I'll have to start from ODIN stock again and again after any failure... Cache wiping seem to work too. The only issue is that goddamn enforcing thing, but I have avoided the problem by performing backups to different, FAT32 formatted external card (16GB sd even from a trusted company seem to be extremely cheap nowadays...) than I use everyday... just a matter of swapping the cards, which seems to be enough for a moment until someone smarter succeed to compile the regular working version... Backup, even 8gb with compression, is being performed very quickly (and correctly!) as N12.2 has great speed of intrernal mem... Zips also install correctly etc.

Reminding, here''s link for "latest" version of "homemade" TWRP 2.7 for P905 working with FAT32 externals:
http://www30.zippyshare.com/v/98456819/file.html

You can flash it if you are rooted by Chainfire's method, by placing twrp.img in the /sdcard folder and have busybox installed (if you can't, use one of the GUI apps from GPlay...), by turning on Terminal Emulator app and typing:
su -c busybox dd if=/sdcard/twrp.img of=/dev/block/mmcblk0p15

P905 only! And don't mistake the last number as you'll flash image to wrong partition which may and surely will result in a brick, sometimes: unrecoverable with Odin...
I haven't ever prepared odin tar's in my life, so if someone can do it instead to ease up the process it would be nice.

3) Maybe there's a workaround which may be used in ie. P905 (which kernel, as far as I understand, don't want to compile in a working way until now, right) to make external card writable ? Example: as of regular android, external card write access can be enabled for everyone by modding /system/etc/permissions/platform.xml - I've made it and it works, at least from within the system. However, I do not know if that file is /system/etc/permissions/platform.xml (or any other describing the permissions) is android specific and it won't work/won't be even loaded or seen under revcovery, or is it a part of SELinux/UNIX/whatever and it will be respected... How do you think?
I can't remember if anyone tested this p905 image: http://techerrata.com/bigbiff/openrecovery-twrp-2.7.0.0-viennaltexx.img.tar
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
Yes, it was said it stuck at samsung boot screen (and i do confirm that), probably due to broken sammy's sources.
Yeah, that seems to be the same thing with picassoltexx. Tonight I am just going to do picassoltexx and viennaltexx with prebuilt kernel.
 

esgie

Senior Member
Feb 17, 2013
333
176
43
Using both stock boot zImage and stock recovery zImage cant get permissive mode, no exfat support.
I've tried a lot of both ramfs and even cmdline options. It seems that those kernels have been built with config_always_enforcing....
Guess only way to hack it is to:
- wait for better sources and recompile... or
- change kernel boolean flag listed in /proc/kallsyms, probably selinux_enforcing, by writing raw zero to kernel memory space, but we need a useful kernel exploit to do that...
Hope you find out some easier way...

Wysłane z mojego SM-P905 przy użyciu Tapatalka
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
Using both stock boot zImage and stock recovery zImage cant get permissive mode, no exfat support.
I've tried a lot of both ramfs and even cmdline options. It seems that those kernels have been built with config_always_enforcing....
Guess only way to hack it is to:
- wait for better sources and recompile... or
- change kernel boolean flag listed in /proc/kallsyms, probably selinux_enforcing, by writing raw zero to kernel memory space, but we need a useful kernel exploit to do that...
Hope you find out some easier way...

Wysłane z mojego SM-P905 przy użyciu Tapatalka
I uploaded a stock built picassoltexx image. Can you test it from goo?
 

ColBill

Senior Member
Apr 6, 2012
265
106
0
Anaheim, CA
I have a P905 and am willing to test the file, however I'd like a recommendation on how best to load and test the file for you.

I have not been able to get mobile odin to work but would like to validate which version of odin might result in the best success. I had success with version 3.07 to root the phone and i'm currently on baseband version p905xxuana7 and kernel version 3.4.0-634464. SE for android status is enforcing; SEPF_SM_P905_4.4.2_0009. security software version is mdf v 1.0 release 2.

I would guess my current choices are odin 3.07 or 3.09 with a wipe of both caches? Thanks for all your efforts and looking forward to having a device with TWRP working.:fingers-crossed:
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
I have a P905 and am willing to test the file, however I'd like a recommendation on how best to load and test the file for you.

I have not been able to get mobile odin to work but would like to validate which version of odin might result in the best success. I had success with version 3.07 to root the phone and i'm currently on baseband version p905xxuana7 and kernel version 3.4.0-634464. SE for android status is enforcing; SEPF_SM_P905_4.4.2_0009. security software version is mdf v 1.0 release 2.

I would guess my current choices are odin 3.07 or 3.09 with a wipe of both caches? Thanks for all your efforts and looking forward to having a device with TWRP working.:fingers-crossed:
I recommend using odin 3.09 to flash it. You don't need to wipe caches to install TWRP.
 

ColBill

Senior Member
Apr 6, 2012
265
106
0
Anaheim, CA
I recommend using odin 3.09 to flash it. You don't need to wipe caches to install TWRP.
Flashed using Odin 3.09 through AP button in Odin. Boots to recovery but only on left-half of screen - can see the first 6 buttons down to setting but unable to get to keyboard. pressing each of the buttons (function keys) causes some function to be invoked but can only see half screen and icons are very large. Only way to get out of recovery was to go back to download and then cancel process. Device then boots to home screen. only issue I've noticed so far is lost screen saver. Suggestions?
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
Flashed using Odin 3.09 through AP button in Odin. Boots to recovery but only on left-half of screen - can see the first 6 buttons down to setting but unable to get to keyboard. pressing each of the buttons (function keys) causes some function to be invoked but can only see half screen and icons are very large. Only way to get out of recovery was to go back to download and then cancel process. Device then boots to home screen. only issue I've noticed so far is lost screen saver. Suggestions?
Can you link the file you flashed on your p905?
 

esgie

Senior Member
Feb 17, 2013
333
176
43
Can you link the file you flashed on your p905?
He probably ran picasaltexx version youve posted few posts before, as there is not much to choose - except not-working at all genuine viennaltexx build - around ;)
I have to add that I had the same issue when I repacked ramdisk from your non-working TWRP for P905 (the one which was causing bootloop by default, coz of buggy sources) with P905s stock kernel zImage - UI (ui was rotated 90 deg so options weren't reachable, then).
Seems you gotta prepare a new image, but with UI settings same as for P900 (which are at least working well, when combined with P905s props and stock kernel...).
 

ColBill

Senior Member
Apr 6, 2012
265
106
0
Anaheim, CA
Can you link the file you flashed on your p905?
I will try with a little help. I have found a app called link to file. Should I use that app? I follow instructions pretty well so if you point me in the right direction I'll be happy to try. I've only had this device for about 3 weeks but have some experience with P6800 tabs. I'm sure you have plenty to do and i know to do the research myself but kind of need a jump start for the concept on where to link the file. Regardless - thanks for the response and your patience. :confused:
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
He probably ran picasaltexx version youve posted few posts before, as there is not much to choose - except not-working at all genuine viennaltexx build - around ;)
I have to add that I had the same issue when I repacked ramdisk from your non-working TWRP for P905 (the one which was causing bootloop by default, coz of buggy sources) with P905s stock kernel zImage - UI (ui was rotated 90 deg so options weren't reachable, then).
Seems you gotta prepare a new image, but with UI settings same as for P900 (which are at least working well, when combined with P905s props and stock kernel...).
OK, I want to work on getting p905 working perfect. PM if you can test. This one has stock kernel http://techerrata.com/bigbiff/openrecovery-twrp-2.7.0.0-viennaltexx.img.tar

If this one boots to TWRP main screen let me know. Also if the gui is rotated let me know. Thanks!
 

ColBill

Senior Member
Apr 6, 2012
265
106
0
Anaheim, CA
OK, I want to work on getting p905 working perfect. PM if you can test. This one has stock kernel http://techerrata.com/bigbiff/openrecovery-twrp-2.7.0.0-viennaltexx.img.tar

If this one boots to TWRP main screen let me know. Also if the gui is rotated let me know. Thanks!
I know you did not ask me but I flashed the new file Odin 3.09 through AP button in Odin. After loading need to invoke recovery and again - It still shows only the first six actions and is on the left side of the screen. I believe if I could scroll the rest of the recovery choices would be available. the orientation is vertical on the horizontal display and i can not get TWRP to rotate. Only way to get back is go go back to download and abort. I hope this helps........
 
  • Like
Reactions: redviper52

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
I know you did not ask me but I flashed the new file Odin 3.09 through AP button in Odin. After loading need to invoke recovery and again - It still shows only the first six actions and is on the left side of the screen. I believe if I could scroll the rest of the recovery choices would be available. the orientation is vertical on the horizontal display and i can not get TWRP to rotate. Only way to get back is go go back to download and abort. I hope this helps........
Thanks, please test http://techerrata.com/bigbiff/openrecovery-twrp-2.7.0.0-viennaltexx.img.tar
 
  • Like
Reactions: ColBill

ColBill

Senior Member
Apr 6, 2012
265
106
0
Anaheim, CA
Think its working

ok progress I get 8 options now ( reboot being last) (looks like normal TWRP screen) - - includes home and return keys in upper right corner - when press square to the right of return key (upper right I get updating partition details - Full selinux support is present. :good:

When go to install I can see both internal and external_sd storage ( I'm using a 128 gb Sandisk card) and can see my folders.

Tried backup to external sd card and get the following error = E: unable to create folder: external_sd/TWRP (errno=13)
E: failed to make backup folder

I was able to backup to the internal space.

What would you like me to try? Congratulations you are getting close if not there now.
 
Last edited:

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
ok progress I get 8 options now ( reboot being last) (looks like normal TWRP screen) - - includes home and return keys in upper right corner - when press square to the right of return key (upper right I get updating partition details - Full selinux support is present. :good:

When go to install I can see both internal and external_sd storage ( I'm using a 128 gb Sandisk card) and can see my folders.

Tried backup to external sd card and get the following error = E: unable to create folder: external_sd/TWRP (errno=13)
E: failed to make backup folder

I was able to backup to the internal space.

What would you like me to try? Congratulations you are getting close if not there now.
Can you do this in TWRP and paste the results:

adb shell getprop ro.hardware
 

ColBill

Senior Member
Apr 6, 2012
265
106
0
Anaheim, CA
Can you do this in TWRP and paste the results:

adb shell getprop ro.hardware
not sure how to do screen capture but screen shows - terminal command and selected default folder

updating partition details...
Full SELinux support is present
/ # adb shell getprop ro.hardware
sh: adb: not found

/ # getprop ro.hardware
qcom
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone