[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
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
Can you do getenforce in the terminal?
 

ColBill

Senior Member
Apr 6, 2012
265
106
0
Anaheim, CA
Can you do getenforce in the terminal?
it says enforcing

---------- Post added at 06:42 PM ---------- Previous post was at 06:36 PM ----------

Can you do getenforce in the terminal?
if it would be quicker for you - pm me your phone number and we'll work through whatever testing you need. I can focus with yu for about an hour if that would help.
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
it says enforcing

---------- Post added at 06:42 PM ---------- Previous post was at 06:36 PM ----------



if it would be quicker for you - pm me your phone number and we'll work through whatever testing you need. I can focus with yu for about an hour if that would help.
I am afraid that my timing only allows asynchronous testing. I will try to compile a kernel and see if we get it booting.

Can you see if http://techerrata.com/bigbiff/openrecovery-twrp-2.7.0.1-viennaltexx.img.tar boots
 
Last edited:
  • Like
Reactions: Criminal23

cavkic

Senior Member
Sep 20, 2009
129
16
0
Bihac
I am having trouble making a custom kernel boot on the P905.
Shame, I'd really love to help you test te new goodies out, but this tablet is supposed to be my workhorse, and I can't rish any instabilities with it when I'm working.

If there's any other way I can help/test without compomising the stability of the sistem I'd be glad to help.
 

esgie

Senior Member
Feb 17, 2013
333
176
43
I can help with testing, too - guess if you'll manage to find out how to compile them so they'll work, it will be a really useful base not even for twrp, but also for all the developers of custom kernels, who can start adding additional features, then, and there is a lot of job to do, starting from enabling kernel-based hotplug governor instead of qcom's mpdecision :)

Guess it will also be a good idea to first create an odin pack including stock-kernel/stock-recovery ONLY, to easily recover from any bootloop which may be caused during testing without need of flashing whole system. Anyone posted that before?

EDIT:
Well, I have created ones myself (credits to mkh.mourad for tool: http://forum.xda-developers.com/showthread.php?t=2446269).

P905 Stock Recovery ODIN flashable:
http://www65.zippyshare.com/v/14010275/file.html

If during testing anything goes wrong, just flash this little tar in download mode and you'll be back to stock, again.

and in addition...
P905 Stock Boot/Kernel (XXUANC3) ODIN flashable:
http://www65.zippyshare.com/v/32441894/file.html

===
PS:
For developement purposes, I have recently found out the following:
- cache wipe doesn't make any mess if after wipe you'll trigger the command:
restorecon -R /cache
please consider adding it somehow at the end of wipe algorithm...
- flashing various zips, especially containing modified libraries to be put in /system/lib (!), messes up selinux context labels for many files. For example: flashing GLTools is causing a bootloop BUT it's not the bad zip content but only wrong context for some files! We just have to trigger:
restorecon -R /system/lib
restorecon -R /system/vendor/lib
and everything is back to normal, with GL Tools working. The problem isn't ofc libs-exclusive... It might be good idea then to add - after flashing every zip - additional command to run by TWRP in background:
restorecon -R /system
it will set the /system labels just as they meant to be. BUT it will broke the su access! Why? See below...
- messing up su binary is caused by the fact that it is being set to its original context (u:eek:bject_r:su_exec:s0), which is somehow restricted by samsung. During flashing su from genuine zip, the contextes are set again using chcon command - seems it's a good idea to set them automatically after flashing zips AND restoring global /system context (as described above) and also after every recovery session. They shall be:
su - u:eek:bject_r:system_file:s0
daemonsu - u:eek:bject_r:system_file:s0
sugote - u:eek:bject_r:zygote_exec:s0 (the last one is a new binary, first introduced in supersu 1.99 recently,,,).
I believe it can be done by chcon command.
 
Last edited:

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
I can help with testing, too - guess if you'll manage to find out how to compile them so they'll work, it will be a really useful base not even for twrp, but also for all the developers of custom kernels, who can start adding additional features, then, and there is a lot of job to do, starting from enabling kernel-based hotplug governor instead of qcom's mpdecision :)

Guess it will also be a good idea to first create an odin pack including stock-kernel/stock-recovery ONLY, to easily recover from any bootloop which may be caused during testing without need of flashing whole system. Anyone posted that before?

EDIT:
Well, I have created ones myself (credits to mkh.mourad for tool: http://forum.xda-developers.com/showthread.php?t=2446269).

P905 Stock Recovery ODIN flashable:
http://www65.zippyshare.com/v/14010275/file.html

If during testing anything goes wrong, just flash this little tar in download mode and you'll be back to stock, again.

and in addition...
P905 Stock Boot/Kernel (XXUANC3) ODIN flashable:
http://www65.zippyshare.com/v/32441894/file.html

===
PS:
For developement purposes, I have recently found out the following:
- cache wipe doesn't make any mess if after wipe you'll trigger the command:
restorecon -R /cache
please consider adding it somehow at the end of wipe algorithm...
- flashing various zips, especially containing modified libraries to be put in /system/lib (!), messes up selinux context labels for many files. For example: flashing GLTools is causing a bootloop BUT it's not the bad zip content but only wrong context for some files! We just have to trigger:
restorecon -R /system/lib
restorecon -R /system/vendor/lib
and everything is back to normal, with GL Tools working. The problem isn't ofc libs-exclusive... It might be good idea then to add - after flashing every zip - additional command to run by TWRP in background:
restorecon -R /system
it will set the /system labels just as they meant to be. BUT it will broke the su access! Why? See below...
- messing up su binary is caused by the fact that it is being set to its original context (u:eek:bject_r:su_exec:s0), which is somehow restricted by samsung. During flashing su from genuine zip, the contextes are set again using chcon command - seems it's a good idea to set them automatically after flashing zips AND restoring global /system context (as described above) and also after every recovery session. They shall be:
su - u:eek:bject_r:system_file:s0
daemonsu - u:eek:bject_r:system_file:s0
sugote - u:eek:bject_r:zygote_exec:s0 (the last one is a new binary, first introduced in supersu 1.99 recently,,,).
I believe it can be done by chcon command.
Yeah, I have put some commits for note3 in fix permissions and other wipe functions. Maybe I need to add the appropriate prebuilt_file_contexts to the TWRP image. I will add that to the todo list, but until I can get the p905 kernel booting we will be missing a lot of features until I can disable certain protection features in the kernel.
 

dodo99x

Senior Member
Apr 2, 2011
365
79
0
Ottawa
@bigbiff Do you know the correct path to the kernel (and any other blocks if you have them) on SM-P900 v1awifi? I'm trying to setup ArchiKitchen to make a debloated ROM and possibly a modified kernel. I already setup a build for the kernel, and was able to get a new boot.img compiled and made into an Odin flashable format. The kitchen will allow me to make TWRP flashable roms and kernels. That's the plan anyway... :)

Thanks,
D.
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,791
6,777
243
@bigbiff Do you know the correct path to the kernel (and any other blocks if you have them) on SM-P900 v1awifi? I'm trying to setup ArchiKitchen to make a debloated ROM and possibly a modified kernel. I already setup a build for the kernel, and was able to get a new boot.img compiled and made into an Odin flashable format. The kitchen will allow me to make TWRP flashable roms and kernels. That's the plan anyway... :)

Thanks,
D.
Here is what I have:

Code:
/dev/block/platform/dw_mmc.0/by-name:
lrwxrwxrwx root     root              2014-03-16 16:41 BOOT -> /dev/block/mmcblk0p9
lrwxrwxrwx root     root              2014-03-16 16:41 BOTA0 -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              2014-03-16 16:41 BOTA1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              2014-03-16 16:41 CACHE -> /dev/block/mmcblk0p19
lrwxrwxrwx root     root              2014-03-16 16:41 CARRIER -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              2014-03-16 16:41 CDMA-RADIO -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              2014-03-16 16:41 EFS -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              2014-03-16 16:41 HIDDEN -> /dev/block/mmcblk0p20
lrwxrwxrwx root     root              2014-03-16 16:41 OTA -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              2014-03-16 16:41 PARAM -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              2014-03-16 16:41 PERSDATA -> /dev/block/mmcblk0p16
lrwxrwxrwx root     root              2014-03-16 16:41 RADIO -> /dev/block/mmcblk0p13
lrwxrwxrwx root     root              2014-03-16 16:41 RECOVERY -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              2014-03-16 16:41 RESERVED2 -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              2014-03-16 16:41 SYSTEM -> /dev/block/mmcblk0p18
lrwxrwxrwx root     root              2014-03-16 16:41 TDATA -> /dev/block/mmcblk0p15
lrwxrwxrwx root     root              2014-03-16 16:41 TOMBSTONES -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              2014-03-16 16:41 USERDATA -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              2014-03-16 16:41 m9kefs1 -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              2014-03-16 16:41 m9kefs2 -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              2014-03-16 16:41 m9kefs3 -> /dev/block/mmcblk0p6
 
  • Like
Reactions: dodo99x

dodo99x

Senior Member
Apr 2, 2011
365
79
0
Ottawa
That's perfect. I just now found the cat command for that. Seems to be exactly what i have in terminal as well. Thank you.

Sent from my SM-P900 using Tapatalk
 

dodo99x

Senior Member
Apr 2, 2011
365
79
0
Ottawa
OK I was able to create my first debloated ROM with ArchiKitchen. For my first test I simply wiped System/Cache/Dalvik and kept my Data. TWRP worked flawlessly, flashed the kitchen Zip file without any problems.

Now I just need to modify the debloat list. The ROM booted fine. All my settings were good except for getting an FC on Samsung Keyboard every few seconds. Switching to Google Keyboard fixed that. I'll have to take a look at the debloat list to see if it removed some keyboard files...

Thanks for your help @bigbiff

Sent from my SM-P900 using Tapatalk
 
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