Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,283 Members 38,655 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][P905] enable init.d support for stock rom LTE QUALCOMM ONLY!

Tip us?
 
esgie
Old
#1  
Senior Member - OP
Thanks Meter 84
Posts: 199
Join Date: Feb 2013
Default [MOD][P905] enable init.d support for stock rom LTE QUALCOMM ONLY!

At first, I am not liable for any harm or damage that may happen to your device!
If you have su and didn't trigger knox, I CANNOT guarantee that running this script won't cause 0x1!

Requirements:
1) P905/viennalte/Qualcomm based model ONLY (won't work on Exynos devices. MIGHT work on other Qualcomm LTE deices from Note Pro and Tab Pro series - feel free to repost but give credits!) running 4.4.2 stock;
2) root access with SuperSU (using cf-root - credits to chainfire);
3) busybox installed (I do recommend this paid installer: https://play.google.com/store/apps/d...busybox.donate , MOST PROBABLY free version will be more than enough, too, but I haven't tested it as I have license...)
4) Android Terminal Emulator installed ( free at: https://play.google.com/store/apps/d...al.androidterm )

Installation:
1) download file init.d_qcom.sh using below link and put it in the root of internal memory (so it will be placed in: /sdcard/init.d_qcom.sh)
2) run Android Terminal Emulator
3) at command line, type:
Code:
su -c /sdcard/init.d_qcom.sh
(give it an access if requested)
4) voila.

Additional info for advanced users:
1) scripts in /system/etc/init.d shall be root:root 755 (and NOT 777 as stated in A LOT of sources, thou has to be a heavy idiot to give write access for system files to "world"...)
2) init.d is handled from one of the /system/etc qualcomm additional scripts as it refused to work using regular install-recovery.sh method...
3) scripts are triggered paralelly but I am using different method (find/nohup/su combination...), as this damn rom refused to simply execute "run-parts" applet...
4) init.d permission helper script included (just put your scripts in init.d and they'll receive proper permissions on reboot)

Download:
http://www12.zippyshare.com/v/32009778/file.html
The Following 2 Users Say Thank You to esgie For This Useful Post: [ Click to Expand ]
 
prohackerbro
Old
#2  
Member
Thanks Meter 2
Posts: 59
Join Date: Aug 2013
Nice to see some developement for this tab!
Anyway to port it to exynos?
 
Criminal23
Old
#3  
Criminal23's Avatar
Senior Member
Thanks Meter 45
Posts: 255
Join Date: Nov 2010
Location: @ home
Quote:
Originally Posted by prohackerbro View Post
Nice to see some developement for this tab!
Anyway to port it to exynos?
+1

sent from my amazing NotePro 12.2 via Tapatalk

Samsung Galaxy S5 - G900F
Rom: stock XXU1ANE2 towelroot
Modem: XXU1ANE1

Samsung Galaxy Note Pro 12.2 ExynosOcta
Rom: stock XXUANC4
Recovery: TWRP 2.7 / Modem: XXUANC4


 
esgie
Old
#4  
Senior Member - OP
Thanks Meter 84
Posts: 199
Join Date: Feb 2013
Quote:
Originally Posted by Criminal23 View Post
+1

sent from my amazing NotePro 12.2 via Tapatalk
I might try, however I do not own the device and the file structure is completely different.. Can you first enter via Android Terminal:
Code:
su
ls -l / >/sdcard/content.txt
ls -l /system/etc >>/sdcard/content.txt
And post the /sdcard/content.txt file which will be created (or its contents only)?
Also, i would be glad if you copy every *.rc file from root of filesystem to a dir , compress it to one file and post it too
The Following User Says Thank You to esgie For This Useful Post: [ Click to Expand ]
 
Criminal23
Old
#5  
Criminal23's Avatar
Senior Member
Thanks Meter 45
Posts: 255
Join Date: Nov 2010
Location: @ home
Quote:
Originally Posted by esgie View Post
I might try, however I do not own the device and the file structure is completely different.. Can you first enter via Android Terminal:
Code:
su
ls -l / >/sdcard/content.txt
ls -l /system/etc >>/sdcard/content.txt
And post the /sdcard/content.txt file which will be created (or its contents only)?
Also, i would be glad if you copy every *.rc file from root of filesystem to a dir , compress it to one file and post it too
Here you are

Criminal23
Attached Files
File Type: txt content.txt - [Click for QR Code] (6.8 KB, 11 views)

Samsung Galaxy S5 - G900F
Rom: stock XXU1ANE2 towelroot
Modem: XXU1ANE1

Samsung Galaxy Note Pro 12.2 ExynosOcta
Rom: stock XXUANC4
Recovery: TWRP 2.7 / Modem: XXUANC4


 
esgie
Old
#6  
Senior Member - OP
Thanks Meter 84
Posts: 199
Join Date: Feb 2013
Quote:
Originally Posted by Criminal23 View Post
Here you are

Criminal23
Quote:
Originally Posted by Criminal23 View Post
Here you are

Criminal23
After looking into sent (and posted) files, I have to say that the init process in our devices are ABSOLUTELY different.
Qualcomm version triggers about 7-8 scripts lying in /system, which are provided by Qualcomm, which are pointed in configuring all the hardware provided with their chipset - in addition to init.???.rc files from the kernel. The clue was to add init.d execution command at the very end of one of those scripts (and that is done automatically with script attached in the first post).
Exynos version does not launch (almost - see below) ANY external script during the boot. Whole process seems to be performed by rc files lying in root of the filesystem, which are embedded in kernel's ramdisk and any edits won't preserve the reboot, so it cannot be done without repacking the kernel and that is something far more troublesome to perform without device in hand, without the firmware on disk and without a plenty of time.
BUT
it still runs /system/etc/install-recovery.sh which is an Android standard and which genuine purpose was to reflash recovery back to stock if a custom one was detected. Now, it is sometimes utlized to run somehing at boot, especially: it is used by SuperSu (in addition with other methods) to run its daemon. The problem is that kitkat introduced enforcing SELinux, that Samsung SELinux policy adds special security context for this file, that install-recovery.sh won't be launched if the file has no proper security label - and that while installing SuperSu, the context is set in a different way and in final, install-recovery.sh isn't launched, until we restore /system context, and restoring context to the system ends with... non working su, so we have to flash it again, breaking install-recovery.sh context... Did you get it? - it's a loop as fixing one thing breaks the second, and fix to the second breaks the first That is why on my qualcomm device i have chosen another script file to run the init.d - and as you don't have any other script except install-recovery.sh, I don't know where it might be put...

BUT also I cannot guarantee that the behavior above is not qualcomm-exclusive and it is possible that on exynos device everything will work without problem!
That's why you may want to try standard method for all the devices (term init - uses install-recovery.sh method described above):
http://forum.xda-developers.com/show....php?t=1933849
and if it won't work then you have to wait for - at least - repacked kernel with init.d support embedded into init.rc files or run your script by an external app, ie SManager. Just be aware that even if term init work, it may stop working every time you flash SuperSu, so remember to run the script again then.

Sorry for not being too helpful.
The Following User Says Thank You to esgie For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Increase Your Multitasking Workflow with C-Floating Windows

Technology has put life on the fast track. Lazy, relaxed days have turned into … more

Compile Your Own Kernel From Source with Comprehensive Tutorial

One glance at any developer section of any device forum on XDA and youll find … more

WowWee Mip – Android Accessory Review – XDA Developer TV

The holidays will be here in no time, so why not start thinking about … more

Stream Your Media Files with the New Version of Droid Sync Manager

Android is a Linux-based operating system, but this fact doesn’t put … more