Easily Generate and Export Material Design Palletes

For many people, it can be pretty difficult to create a palette of complementary colors. … more

Android One Expanding to Bangladesh, Nepal, and Sri Lanka

At Google I/O 2013, Google proudly announced that the Android operating system was … more

Android 5.0.2 Fixes 2012 Nexus 7! Sony’s Making a Google Glass Competitor? – XDA TV

Android 5.0.2 Lollipop is available for the … more

Early Lollipop Ports for Micromax A116 and A117

It feels like it was only yesterday when Google announced the mysterious Android L.After … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP esgie

28th May 2014, 09:11 AM   |  #1  
OP Senior Member
Thanks Meter: 97
 
222 posts
Join Date:Joined: Feb 2013
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 4 Users Say Thank You to esgie For This Useful Post: [ View ]
28th May 2014, 06:25 PM   |  #2  
Member
Thanks Meter: 2
 
75 posts
Join Date:Joined: Aug 2013
Nice to see some developement for this tab!
Anyway to port it to exynos?
31st May 2014, 01:51 PM   |  #3  
Quote:
Originally Posted by prohackerbro

Nice to see some developement for this tab!
Anyway to port it to exynos?

+1

sent from my amazing NotePro 12.2 via Tapatalk
31st May 2014, 01:59 PM   |  #4  
OP Senior Member
Thanks Meter: 97
 
222 posts
Join Date:Joined: Feb 2013
Quote:
Originally Posted by Criminal23

+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: [ View ]
31st May 2014, 02:55 PM   |  #5  
Quote:
Originally Posted by esgie

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, 14 views)
31st May 2014, 10:09 PM   |  #6  
OP Senior Member
Thanks Meter: 97
 
222 posts
Join Date:Joined: Feb 2013
Quote:
Originally Posted by Criminal23

Here you are

Criminal23

Quote:
Originally Posted by Criminal23

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: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes