[STOCK]INIT.D support. No need to flash anything or even reboot into recovery - Galaxy Note 10.1 Android Development

So yea I've been working on a proper "app2sd" solution that doesn't involve just switching the MicroSD for the eMMC, but I like the stock rom so far, so I didn't feel like flashing a rom just to get init.d, and I didn't feel like modifying the ramdisk in the kernel either. So I cooked up this script that anyone can run from terminal to get init.d support. It should work for other devices too, as long as they run /system/etc/install-recovery.sh on boot.
There's only three requirements for it to work:
#1 You must be rooted
#2 Your device must run /system/etc/install-recovery.sh
#3 You must have busybox
I tested a few times on my own device (GT-N8013), but haven't had anyone else test it, so don't freak out if it doesn't work. Just let me know what went wrong and I'll figure something out.
Running it is very simple:
#1 Open any terminal app
#2 su
#3 navigate to the folder where you have the script
#4 sh ./enableinit.sh
Your device will be rebooted once the process is done, don't freak out. If everything went fine, you'll have a file in /sdcard called init.d.log created by the test init.d script that is made by the enabler.
You can either download the attachment (rename it to enableinit.sh if you get the attachment), or create the file with the contents betlow:
Code:
#!/system/bin/sh
# Adds init.d support to any device that automatically runs /system/etc/install-recovery.sh
# on startup.
#
# Made by TweakerL, make sure to visit us at and-host.com or chat with us on freenode #and-host
echo '##################################################'
echo '## ##'
echo '## Script by TweakerL ##'
echo '## Visit us at and-host.com ##'
echo '## Chat with us at freenode #and-host ##'
echo '## ##'
echo '##################################################'
echo ''
echo 'This script will enable init.d if your device'
echo 'executes /system/etc/install-recovery.sh'
echo ''
echo 'Your tablet will be rebooted once the process'
echo 'is done.'
echo ''
echo 'If the script successfully enabled init.d you will'
echo 'have a file in /sdcard called init.d.log after'
echo 'the device is done rebooting. Remember to always'
echo 'set the proper permissions in your scripts or they'
echo 'will not work.'
echo ''
read -p "Press ENTER to continue..."
if [ ! -f /system/xbin/busybox -a ! -f /system/bin/busybox ]
then
echo 'You do not have busybox. Exiting now...'
else
# Mount system as rw in order to execute the script
busybox mount -o remount,rw -t ext4 /dev/block/mmcblk0p9 /system
# Check if install-recovery.sh already exists, and if so
# add the necessary lines, otherwise create it
if [ -f /system/etc/install-recovery.sh ]
then
if cat /system/etc/install-recovery.sh | busybox egrep -i "sysinit"
then
echo sysinit already present in install-recovery.sh, skipping this step.
else
busybox cp -f /system/etc/install-recovery.sh /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
fi
else
echo '#!/system/bin/sh' >> /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
busybox chmod 755 /system/etc/install-recovery.sh
fi
# Check if sysinit already exists and if so skip step
# otherwise create it
if [ ! -f /system/bin/sysinit ]
then
echo '#!/system/bin/sh' >> /sdcard/kuhbgrdxsq
echo 'export PATH=/sbin:/system/sbin:/system/bin:/system/xbin' >> /sdcard/kuhbgrdxsq
echo '' >> /sdcard/kuhbgrdxsq
echo '/system/bin/logwrapper busybox run-parts /system/etc/init.d' >> /sdcard/kuhbgrdxsq
busybox cp -f /sdcard/kuhbgrdxsq /system/bin/sysinit
busybox chmod 755 /system/bin/sysinit
else
echo sysinit already exists in /system/bin. init.d should already be enabled.
fi
# Cleanup
busybox rm -f /sdcard/qsxdrgbhuk.sh
busybox rm -f /sdcard/kuhbgrdxsq
#Check that init.d folder exists and if not create it
# as well as set the right permissions
if [ -d '/system/etc/init.d' ]
then
chmod 755 /system/etc/init.d
else
mkdir /system/etc/init.d
chmod 755 /system/etc/init.d
fi
# Create a test init.d script that echoes a file to
# /sdcard on successful execution
echo '#!/system/bin/sh' > /sdcard/99testinit
echo '' >> /sdcard/99testinit
echo 'echo init.d works > /sdcard/init.d.log' >> /sdcard/99testinit
busybox cp -f /sdcard/99testinit /system/etc/init.d
chmod 755 /system/etc/init.d/99testinit
busybox rm -f /sdcard/99testinit
# Sync and remount system
sync
busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p9 /system
# Reboot system to enable init.d
if [ -f /system/bin/reboot ]
then
echo Your device will reboot in 3 seconds
sleep 3
reboot
else
echo "Your device doesn't appear to have a reboot command,"
echo "please reboot your device now to avoid problems."
fi
fi

reserved

TweakerL said:
reserved
Click to expand...
Click to collapse
it is good!

TweakerL said:
reserved
Click to expand...
Click to collapse
Thanks for sharing.
Im tested my ainol elf offical rom novo0706, and worked. Thank
Sent from my Ainol Novo 7 Elf using Tapatalk 2

Pretty awesome. Will edit once i try this out.
Edit: Everything worked. Tested on GT-N8013
Thanks alot.
Sent from my GT-N8013 using Tapatalk 2

Hi, Can you tell more clearly how to make this work.
Sent from my GT-N8000 using xda app-developers app

Can any one make .zip file to flash thru recovery..thanks

The point was not to have to go into recovery...
Anyway, it's really simple...
Download the attached file
open terminal
then do the following commands
Code:
su
cd /sdcard
sh ./Download/enableinit.sh.txt
assuming that your browser saves files to /sdcard/Download

Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app

So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.

andylam16 said:
Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
It has nothing to do with knowing anything about computers, as you don't need a computer to do this... just your device...
Download the file, on your device, if you're using stock browser it will go to /sdcard/Download
Make sure you have busybox, download a busybox installer from the market, install it, and run it, and tell it to install busybox
Download a terminal app from the play store for free, such as android terminal emulator, install it and open it
then type in these exact commands, just like they're in here, in the terminal:
Code:
su
sh /sdcard/Download/enableinit.sh
Assuming of course, that your stuff is getting download to /sdcard/Download.
If you can't do this... sell your android device and buy an iCrap one...
drnish83 said:
So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.
Click to expand...
Click to collapse
I'm working on my own app2sd script that should beat anything ever made. Here's what it does:
It uses a second partition in the MicroSD card for gaining extra storage, this partition has to be formatted to ext4
#1 It mounts the external ext4 partition to a new location
#2 It detects the location for /sdcard/Android; /data/data; /data/app no matter what device you have (suppose the directories aren't the same for a certain device)
#3 It has the option to mount /sdcard/Android to a folder in the external partition
#4 It has the option to mount /data/data to a folder in the external partition
#5 It has the option to mount /data/app to a folder in the external partition
#6 It has the option to automatically copy everything from any of those folders to the appropriate folder in the external partition
#7 It has the option to automatically wipe from the internal storage anything that it moves
#8 If you have all options enabled, apps will be automatically installed to the external partition and never take any space in the internal storage, while everything else (Download/recovery/backup/pictures/videos/etc...) all remain in the internal partition.

Wow... cant wait for this script
Sent from my GT-N8013 using Tapatalk 2

Thanks for explaining. Interesting indeed! Will definitely wait for it eagerly!

Here's a preview of the super app2sd script I'm working on. Much of it is already implemented, should have it all in a couple of days

confusing
I have tried your script and it has successful at first.. then i flashing my note again with stock rom and i try using ur script again but now there is nothing chance.. do you know why?? what must i do now??

You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?

NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Busy box installs on mine.
Sent from my GT-N8013 using Tapatalk 2

NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Only reason you wouldn't be able to install busybox is if you're not rooted.

Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app

Welly_11 said:
Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app
Click to expand...
Click to collapse
Look for these files and let me know if they're there:
/system/etc/install-recovery.sh
/system/bin/sysinit
/system/etc/init.d/99testinit
**************************************
If anybody needs help, look for me on irc - #and-host in freenode

Related

[SCRIPT] Permissions Init Script

Hey guys,
I had a nasty issue with Bi-Winning a couple weeks ago where I pushed custom framework and totally forgot about permissions. Apparently when you don't set the proper permissions it can really slow things down.
So I figured this could easily be avoided. So because of that and our CWM "Fix Permissions" option doesn't really do anything, I wrote this script to fix it!
Upon every boot, it will scan /system/app, /system/framework/, and /data/app and set the proper permissions for all the files in there.
Users
note if you're on Trigger 2.9.1+ or Bi-Winning V1+ you do NOT have to do this. It's built into your ROM already.
Flash the attached zip named "CWM_Flash_Permissions_Script.zip"
Ironically, it may not have the correct permissions after you flash it, so then do either of the following
1) Do these commands in ADB to set the correct permissions
Code:
adb shell
mount -o rw,remount /dev/block/stl9 /system
busybox chmod 777 /system/etc/init.d/*
or
2) Open up Root Explorer (or something similar)
navigate to /system/etc/init.d/
in there find the new file S30edt_perms
long press, and set the permissions
make it look like this
Code:
x x x
x x x
x x x
Here's the init.d script, it's really simple, but also effective
Code:
#!/system/bin/sh
# Permission script
# Written by Einherjar Dev Team
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
mount -o rw,remount /dev/block/stl9 /system
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo " setting permissions (644) for $file" >> $logFile
chmod 644 $file
done
echo "chmodding init.d folder"
chmod 777 /system/etc/init.d
for file in /system/etc/init.d/*; do
echo " setting permissions (777) for $file" >> $logFile
chmod 777 $file
done
echo "Permissions set" >> $logFile
Very cool, thanks roman.
Very cool to post the code too... lets us linux newbs get our learn on!
Poser said:
Very cool, thanks roman.
Very cool to post the code too... lets us linux newbs get our learn on!
Click to expand...
Click to collapse
I'm a Linux noobie myself!
birgertime said:
I'm a Linux noobie myself!
Click to expand...
Click to collapse
[slight OT] Just getting wifi working on an old ideapad y510 in slackware was an epic struggle... (wicd my arse)
[back on topic] I wish more devs would post script contents (though we can easily download and look in vi or notepad)... it helps the learning curve immensely
grateful for all the work EDT and rest of dev community does. We all are.
Question: What does the fix permissions CWM do then?
Poser said:
[slight OT] Just getting wifi working on an old ideapad y510 in slackware was an epic struggle... (wicd my arse)
[back on topic] I wish more devs would post script contents (though we can easily download and look in vi or notepad)... it helps the learning curve immensely
grateful for all the work EDT and rest of dev community does. We all are.
Question: What does the fix permissions CWM do then?
Click to expand...
Click to collapse
I have no clue, lol. Never bothered looking at it
edit: I hate vi.
roman im gonna add S30edt_perms.zip to my rom ..ill add you to credits
birgertime said:
I have no clue, lol. Never bothered looking at it
edit: I hate vi.
Click to expand...
Click to collapse
lol.
Vi is about as stripped down as you can get when it comes to text based editors... (I know its blasphemous... but I dig notepad++, shhh... dont tell)
I get "Bad Mode"
gamefreakgcb said:
I get "Bad Mode"
Click to expand...
Click to collapse
Hmm, ok you might need super user permissions do this and let me knkow if it works:
1) type in "adb shell"
2) type in su (don't press enter yet)
3) turn your screen on & unlock it
4) press enter on the su prompt, then his yes on the screen
then try that chmod command again.
birgertime said:
Hmm, ok you might need super user permissions do this and let me knkow if it works:
1) type in "adb shell"
2) type in su (don't press enter yet)
3) turn your screen on & unlock it
4) press enter on the su prompt, then his yes on the screen
then try that chmod command again.
Click to expand...
Click to collapse
Gave permission, still "Bad Mode"
gamefreakgcb said:
Gave permission, still "Bad Mode"
Click to expand...
Click to collapse
bad mode in the command line? gotta give me something more here
if it' s when you run chmod +x try this one:
Code:
busybox chmod 777 /system/etc/init.d/*
birgertime said:
bad mode in the command line? gotta give me something more here
if it' s when you run chmod +x try this one:
Code:
busybox chmod 777 /system/etc/init.d/*
Click to expand...
Click to collapse
When I do that, I get
chmod: /system/etc/init.d/S01edt_systcl: Read-only file system
chmod: /system/etc/init.d/S20edt_gps: Read-only file system
chmod: /system/etc/init.d/S30edt_perms: Read-only file system
chmod: /system/etc/init.d/S50edt_zipalign: Read-only file system
chmod: /system/etc/init.d/S98edt_tweaks: Read-only file system
chmod: /system/etc/init.d/S99edt_complete: Read-only file system
gamefreakgcb said:
When I do that, I get
chmod: /system/etc/init.d/S01edt_systcl: Read-only file system
chmod: /system/etc/init.d/S20edt_gps: Read-only file system
chmod: /system/etc/init.d/S30edt_perms: Read-only file system
chmod: /system/etc/init.d/S50edt_zipalign: Read-only file system
chmod: /system/etc/init.d/S98edt_tweaks: Read-only file system
chmod: /system/etc/init.d/S99edt_complete: Read-only file system
Click to expand...
Click to collapse
Oh crap, thanks for pointing that out man. Easy fix
do this
Code:
mount -o rw,remount /dev/block/stl9 /system
busybox chmod 777 /system/etc/init.d/*
should work like a charm
by the way, next time you flash a newer edt rom, they already have this fix built in. since you overwrote the file, you'll need to run the above commands to set the correct permissions as they get messed up sometimes when modifying them.
That did the trick, thanks.
The script in the .zip says
Code:
# Permission script
# Written by Roman (birgertime)
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo "setting permissions for $file" >> $logFile
chmod 0644 $file
done
echo "Permissions set" >> $logFile
Which is different than the OP. I'm confused.
MikeyMike01 said:
The script in the .zip says
Code:
# Permission script
# Written by Roman (birgertime)
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo "setting permissions for $file" >> $logFile
chmod 0644 $file
done
echo "Permissions set" >> $logFile
Which is different than the OP. I'm confused.
Click to expand...
Click to collapse
I notice that before... but got side tracked and forgot to mention something... I just pulled the one from in Bi-Winning V2 and have been ADB Push'ing that.
EDIT: Also noticed that the one that's in Dan_Brutal "Metrik Part 1- Pepperkake" is the wrong one.
Does this works on hd2 android? i really need this..
haysnamrip said:
Does this works on hd2 android? i really need this..
Click to expand...
Click to collapse
Should work on any Android that can run scripts
i flashed and its working.. no more changing permission after run fix_permissins on terminal emulator..
Hey Roman, thanks for yet another improvement for this phone!
Simple question: can I just download and push the S30edt_perms.zip to etc/int.d? And is this any good for CM7 based ROMs? I just checked and that file isn't in my init.d folder on Trigger Redux.
Thanks!
Sent from my rough sketch of a Vibrant on a brick.

[Q] Build.prop edit on boot userinit.sh script

I'm trying to make a script that will do a modification to the build.prop on boot.
Usually I flash the cm7 nightly and I pull the build.prop, modify it and push it back before the first boot. The idea is to make it easier for flashing roms on the go. Using custom_backup_list.txt seems to be a viable option but it will keep an old build.prop indefinitely.
Some of the properties that I want to change are
Code:
windowsmgr.max_events_per_sec=100
ro.sf.lcd_density=201
ro.config.ringtone=_Mosquito 16bit.mp3
ro.config.alarm_alert=Alarm_Beep_02.ogg
From what I read today CM7 looks for inituser.sh file at two different locations:
Code:
/sd-ext/userinit.sh
/data/local/userinit.sh
As of now I have tried without success doing the following
Make a userinit.sh script at /data/local with the following code
Code:
#!/system/bin/sh
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
setprop windowsmgr.max_events_per_sec 100
setprop ro.sf.lcd_density 201
setprop ro.config.ringtone "_Mosquito 16bit.mp3"
setprop ro.config.alarm_alert Alarm_Beep_02.ogg
I'm not sure if there's something wrong in the above code, or CM7 is not running the scripts on boot.
EDIT: after adb push the file I do
Code:
adb shell
chmod 755 /data/local/userinit.sh
I've been trying for several hours now. Still get issue with stuck at X.
This is my updated script. Not sure what is wrong...
Using CM7 nightly36
cavs intersectraven
ss4n1 script
dtapp2sd
this is my userinit.sh at /data/local
Code:
#!/system/bin/sh
file=/system/.bproped
if [ -f "$file" ]; then
echo "Done already"
else
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
sed -i '/ro.config.ringtone/d' /system/build.prop
sed -i '/ro.config.alarm_alert/d' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "ro.config.ringtone=_Mosquito 16bit.mp3" >> /system/build.prop
echo "ro.config.alarm_alert=Alarm_Beep_02.ogg" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo > /system/.bproped
fi;
exit 0
I know where you're coming from. Takes a while to customize your phone manually after each nightly, so I actually have a custom script similar to what you're doing, which updates build.prop and other config files (hosts, gps.conf, etc). Only mine is run within the update.zip, using the recovery shell /sbin/sh.
For your method, you can try this ...
Code:
#!/system/bin/sh
MODIFIED=`cat /system/build.prop|grep "zeus_chingon"`
if [ "$MODIFIED" ];
then
echo "Done already"
else
mount -o remount,rw /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
RINGTONE=`cat /system/build.prop|grep "ro.config.ringtone"`
sed -i 's/$RINGTONE/ro.config.ringtone=_Mosquito_16bit.mp3/g' /system/build.prop
ALARM=`cat /system/build.prop|grep "ro.config.alarm_alert"`
sed -i 's/$ALARM/ro.config.alarm_alert=Alarm_Beep_02.ogg/g' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo "# Modified by zeus_chingon" >> /system/build.prop
mount -o remount,ro /system
fi
EDIT:
My own custom script is HERE. Feel free to modify for your own use.
ch33kybutt said:
I know where you're coming from. Takes a while to customize your phone manually after each nightly, so I actually have a custom script similar to what you're doing, which updates build.prop and other config files (hosts, gps.conf, etc). Only mine is run within the update.zip, using the recovery shell /sbin/sh.
For your method, you can try this ...
Code:
#!/system/bin/sh
MODIFIED=`cat /system/build.prop|grep "zeus_chingon"`
if [ "$MODIFIED" ];
then
echo "Done already"
else
mount -o remount,rw /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
RINGTONE=`cat /system/build.prop|grep "ro.config.ringtone"`
sed -i 's/$RINGTONE/ro.config.ringtone=_Mosquito_16bit.mp3/g' /system/build.prop
ALARM=`cat /system/build.prop|grep "ro.config.alarm_alert"`
sed -i 's/$ALARM/ro.config.alarm_alert=Alarm_Beep_02.ogg/g' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo "# Modified by zeus_chingon" >> /system/build.prop
mount -o remount,ro /system
fi
EDIT:
My own custom script is HERE. Feel free to modify for your own use.
Click to expand...
Click to collapse
Thanks for your help, I end up using your zip file with some modification. The problem that I keep encountering is that using the /data/local/userinit.sh method it get stuck on boot at X.
I saw in your buildprop.sh some settings like
Code:
ro.HOME_APP_ADJ=1
ro.HOME_APP_MEM=3072
what does each one do?
I use LauncherPro if that have anything to do with it.
ro.HOME_APP_ADJ determines oom_adj value and ro.HOME_APP_MEM determines memory threshold, for your chosen launcher app. In short, these settings help to keep the launcher resident in memory and thus reduce homescreen lag.
One thing you have know about the ro.* settings in build.prop, are that they are writeable one-time only, i.e. once any ro.* value has been set, it becomes read-only and you cannot use setprop to change it further.
So it seems that your orginal buildprop.sh script add to the first line of build prop by using the
Code:
sed -i '1i\Something' /system/build.prop;
to put it in "higher priority" so that it get run first and overlook the second occurence that might occur in the build.prop afterwards?
So if i want to add something to line number n it would be
sed -i 'ni\something' .......
zeus_chingon said:
So it seems that your orginal buildprop.sh script add to the first line of build prop by using the
Code:
sed -i '1i\Something' /system/build.prop;
to put it in "higher priority" so that it get run first and overlook the second occurence that might occur in the build.prop afterwards?
So if i want to add something to line number n it would be
sed -i 'ni\something' .......
Click to expand...
Click to collapse
That's correct.
Build.prop
Hi All,
By default my System folder didn't had the build.prop. i extracted it from the CM7 Rom made some changes and copied it to System folder and rebooted.
Changes ringtone(default) Playa.ogg to Rigel.ogg.
After reboot still Playa.ogg as my default ringtone.
What is figured was my Phone isnt including build.prop file
Any suggestions?
Thanx
Wildfire Rooted(CM7 Nightly 2.3.5)

[GAPPS][NATIVESD]NativeSD installer for JB Gapps

Hi All,
Workaround http://forum.xda-developers.com/showpost.php?p=37246757&postcount=11
I've put together aroma installer for installing Google Apps to NATIVESD Jelly bean ROM's.
Theoretically it should work for all rom's, but I haven't tested it yet
You can download it from: gapps-jb-20121011_NativeSD_v1.zip - 90.33 MB
Changelog:
v1: 20.01.2012 attempt to add suport for PAC
Old version:gapps-jb-20121011_NativeSD.zip - 90.33 MB
IF you want to say thanks to anyone, say thanks to Securecrt, Xylograph for giving us NATIVESD
HypoTurtle for providing code for universal installer His work
Hi, has anyone tried it, is it working? I would appreciate to get feedback on which ROMs is it working or not.
Thanks
Sent from my HTC HD2 using xda premium
Does't work for me
Sent from my HTC HD2 using xda premium
samehfarahat said:
Does't work for me
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
What is your setup? ROM name, etc..?
PAC 1.2a
Sent from my HTC HD2 using xda premium
OK, I'll check it out during the weekend
GAPPS NativeSD installer Does not Work
Doesn't work for me either
I am using "16JAN2013][ROM][JB][4.1.2]C.A.M.P.S_HD2_v1.3[CM10/AOKP/MIUI/PA/SONY][WIP][NATIVESD] "
Please help!
Thanks
Hi guys,
I think I found the issue at least for PAC rom. I was caused by slightly different way of mounting partitions. I'm uploading new zip right now, first post should be updated in few minutes.
Please let me know if it's working for you now.
If you do not want to wait, you can replace contents of mount_NativeSD.sh file with following script:
Code:
#!/sbin/sh
mmcblk0p2=`ls /dev/block/mmcblk0p2`
# Mount the ext4 partition
if [ $mmcblk0p2 == "/dev/block/mmcblk0p2" ]
then
mkdir -p /ext4p
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
cp /ext4p/NativeSD/initrd.gz /tmp/initrd.gz
mkdir /tmp/ramd
cd /tmp/ramd
gzip -d -c ../initrd.gz | cpio -i -d
#!/bin/sh
if [ -a "init.android" ]
then
sed -n '/rom_name=/w romname.txt' /tmp/ramd/init
sed -i 's/rom_name=//' romname.txt
else
if [ -f "mountfs.sh" ]
then
sed -n '/rom_name=/w mount.txt' mountfs.sh
sed -n '1w romname.txt' mount.txt
sed -i 's/rom_name="//' romname.txt
sed -i 's/"//' romname.txt
else
sed -n '/--bind/,/system/w initrc.txt' init.rc
sed -n '1w romname.txt' initrc.txt
sed -i 's,exec /bin/busybox mount --bind /NativeSD/,,
s,/system /system,,
s/ *//g' romname.txt
sed -i 's/[[:blank:]]//g' romname.txt
fi
fi
export ROM_NAME=`cat romname.txt`
mount --bind /ext4p/$ROM_NAME/system /system
mount --bind /ext4p/$ROM_NAME/data /data
#the sd-ext directories are ready, so flag the updater-script
echo "NativeSD=true" >> /tmp/nfo.prop
else
#no ext4 partition found
echo "NativeSD=false" >> /tmp/nfo.prop
fi
asisislam said:
Doesn't work for me either
I am using "16JAN2013][ROM][JB][4.1.2]C.A.M.P.S_HD2_v1.3[CM10/AOKP/MIUI/PA/SONY][WIP][NATIVESD] "
Please help!
Thanks
Click to expand...
Click to collapse
If new version is still not working for you, please post initrd.gz from your NATIVESD folder.
I tried the gapps-jb-20121011_NativeSD_v1.zip
for 2 ROMs:
[Dec. 9, 2012][ROM][720p] NexusHD2-JellyBean-4.1.2-CM10 V1.3a [NativeSD]
and
[16JAN2013][ROM][JB][4.1.2]C.A.M.P.S_HD2_v1.3[CM10/AOKP/MIUI/PA/SONY][WIP][NATIVESD]
Unsuccessfull in both cases, I got the following error message:
Applying to SD-EXT
Mounting EXT PArtition
file_getprop: failed to stat "/tmp/nfo.prop": No such file or directory
(Attached are the initrd.files)
Well it seems that just about every ROM has a bit different method of setting ROM name. It's going to be very hard to create automatic script.
In the meantime you can do the following.
1. download zip file
2. create new file called mount_NativeSD.sh anywhere with following contents
Code:
#!/sbin/sh
# Set the ROM name
ROM_NAME=[COLOR="Red"]ROM_NAME[/COLOR]
export ROM_NAME
mmcblk0p2=`ls /dev/block/mmcblk0p2`
# Mount the ext4 partition
if [ $mmcblk0p2 == "/dev/block/mmcblk0p2" ]
then
mkdir -p /ext4p
# mkdir -p /sdcard/NativeSD/$ROM_NAME
# mkdir -p /boot /boot_dir
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
# mkdir -p /ext4p/$ROM_NAME/system /ext4p/$ROM_NAME/data
mount --bind /ext4p/$ROM_NAME/system /system
mount --bind /ext4p/$ROM_NAME/data /data
# mount --bind /sdcard/NativeSD/$ROM_NAME /boot
# mount --bind /sdcard/NativeSD /boot_dir
#delete the old system
# rm -rf /system/*
#clean the dalvik-cache
# rm -rf /data/dalvik-cache/*
#the sd-ext directories are ready, so flag the updater-script
echo "NativeSD=true" >> /tmp/nfo.prop
else
#no ext4 partition found
echo "NativeSD=false" >> /tmp/nfo.prop
fi
3. Replace red text with desired ROM name (eg. JellyBelly, PA_LEO, PAC, etc...)
4. replace mount_NativeSD.sh file inside the zip with the file you just created (name should be mount_NativeSD.sh)
hi, I tried with JellyTime R32 but it doesn't work, I tried replacing the rom name with JellyTime and JellyTime_R32 but I got file_getprop: failed to stat "/tmp/nfo.prop": No such file or directory . Here is my init file..
dcos said:
Hi All,
Workaround http://forum.xda-developers.com/showpost.php?p=37246757&postcount=11
I've put together aroma installer for installing Google Apps to NATIVESD Jelly bean ROM's.
Theoretically it should work for all rom's, but I haven't tested it yet
You can download it from: gapps-jb-20121011_NativeSD_v1.zip - 90.33 MB
Changelog:
v1: 20.01.2012 attempt to add suport for PAC
Old version:gapps-jb-20121011_NativeSD.zip - 90.33 MB
IF you want to say thanks to anyone, say thanks to Securecrt, Xylograph for giving us NATIVESD
HypoTurtle for providing code for universal installer His work
Click to expand...
Click to collapse
You can choose the programs ?

[Q] Init.d under Cocore 6.2 dont working [SOLVED]

Hi
Im using Galaxy S Advance with:
JB 4.1.2 and stock ROM
rooted
kernel Cocore 6.2
I tried to use script on boot from init.d directory, unfortunately not working.
To see if it works fine, I created /etc/init.d folder
with permissions 777, owner root
Inside init.d folder, I created simple script: testinit.sh also testinit
Code:
#!/system/bin/sh
echo init.d script is working > /storage/sdcard0/init.txt
file permissions 777, owner root
But after restart, file init.txt on sdcard0 isnt created,
so I suppose that script isnt running.
I created also another script follow Cocore thread
Code:
#!/system/bin/sh
insmod /lib/modules/logger.ko
for start logger. Logger didnt start also.
Both scripts started in console or adb works fine.
Tnx in advance
darcik said:
Hi
Im using Galaxy S Advance with:
JB 4.1.2 and stock ROM
rooted
kernel Cocore 6.2
I tried to use script on boot from init.d directory, unfortunately not working.
To see if it works fine, I created /etc/init.d folder
with permissions 777, owner root
Inside init.d folder, I created simple script: testinit.sh also testinit
Code:
#!/system/bin/sh
echo init.d script is working > /storage/sdcard0/init.txt
file permissions 777, owner root
But after restart, file init.txt on sdcard0 isnt created,
so I suppose that script isnt running.
I created also another script follow Cocore thread
Code:
#!/system/bin/sh
insmod /lib/modules/logger.ko
for start logger. Logger didnt start also.
Both scripts started in console or adb works fine.
Tnx in advance
Click to expand...
Click to collapse
Try this way: LINK.
Tnx for answer, atm I abandoned testinit script, this isnt important
and focused on start of logger .
I changed it to
Code:
#!/system/bin/sh
busybox mount -o remount,rw -t auto /system;
busybox insmod /lib/modules/logger.ko
but logger didnt start.
Does the system log, what happens when boot, I mean errors?
I have a habit of "big" Linux system
darcik said:
Tnx for answer, atm I abandoned testinit script, this isnt important
and focused on start of logger .
I changed it to
Code:
#!/system/bin/sh
busybox mount -o remount,rw -t auto /system;
busybox insmod /lib/modules/logger.ko
but logger didnt start.
Does the system log, what happens when boot, I mean errors?
I have a habit of "big" Linux system
Click to expand...
Click to collapse
I think log starts after script is executed, and it can't be executed during pre-boot. So maybe it only works when you get in system (booted). And then there is not much to show, try doing some thing while logcat is triggered. Like change governor, IO etc.
I am just gessing this, maybe I am wrong about that, but seams logical to me. :fingers-crossed:
Lol
Incidentally, I found the answer to my problem in this topic.
Save the script without any extensions (Yes, not even .sh extension).
Click to expand...
Click to collapse
So I renamed my script to logcat without sh extension and all works.
Anyway tnx for help.
Cocore 8.0 init.d not working
I make this init.d file for cocore 8.0:
#!/system/bin/sh
busybox mount -o remount,rw -t auto /system;
echo 12 > /sys/module/mxt224e/parameters/threshold_batt
echo init.d script is working > /storage/sdcard0/init.txt
echo "pegasusq" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "sio" > /sys/block/mmcblk0/queue/scheduler
echo 100663296 > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0
echo 700 > /sys/kernel/abb-charger/max_ac_c
echo 0 > /sys/module/mali/parameters/mali_debug_level
Click to expand...
Click to collapse
placed in /system/etc/init.d with "logcat" name. This scirpt don't make the txt file. Why?
Permission 755 for script file. No .sh at the end - just filename.
That should help
Sent from my SGS Adv. using xda-developers app.
th3cr0w said:
Permission 755 for script file. No .sh at the end - just filename.
That should help
Sent from my SGS Adv. using xda-developers app.
Click to expand...
Click to collapse
The solution was i left some space after the command. Thank you!

Zenfone 2 Laser [Z00T] ASUS camera to SD app script (ROOT) Lineage/CM (7.1.1)

This is a script based on this great post https://forum.xda-developers.com/showpost.php?p=70357867&postcount=734
I've compiled te steps needed for fix automation on this script, to spare some time.
First of all you need to be root to run this
You can run this script from any file manager (as root) no command line access needed.
Need to have ASUS camera previously installed, once the app is installed, just run the script (I have it saved on my SD card).
Be aware, after script finish to run your phone will reboot.
fixcamera.sh
Code:
echo "Fixing Camera..."
echo "Start..."
echo "Re-mount /system as rw file system..."
mount -o rw,remount /system
cd /system/priv-app
echo "Creating /system/priv-app/AsusCamera"
mkdir AsusCamera
echo "Updating permissions"
chmod 755 AsusCamera
echo "Copying AsusCamera base.apk to /system/priv-app/AsusCamera"
cp /data/app/com.asus.camera-1/base.apk /system/priv-app/AsusCamera
echo "Uninstalling Asus Camera"
cd /data/app/
rm -rf com.asus.camera-1
echo "Setting permissions"
chmod 644 /system/priv-app/AsusCamera/base.apk
res=`cat /system/build.prop |grep ro.epad.mount_point.microsd=/storage/sdcard1`
if [ -z $res ]
then
echo "ro.epad.mount_point.microsd=/storage/sdcard1" >> /system/build.prop
fi
echo "Installing Asus Camera base.apk"
cd /system/priv-app/AsusCamera/
pm install base.apk
reboot
Be sure to set proper permissions to script file.
It worked for me on CM 7.1.1 and Latest 7.1.1 LineageOs releases.
Haven't tried it with other Zenfone models, but you can take your chances.
NOTE: Asus Camera app will just dissapear on every update, so after every install, you need first install Asus Camera from market and run this.

Categories

Resources