# Android x86 init.sh



## nastypx86 (Apr 2, 2020)

I know nothing about this OS. I need to make a change to the init.sh file no matter what I use I cannot save delete or overwrite. If I copy the file to another location no problem but cannot put back into the system/etc .... I have tried a terminal window es file explorer and a txt editer.  I know it's a system file and protected but their must be a way.  please advise. Thank you


----------



## xvi (Apr 2, 2020)

Are you rooted?
Edit: Oh, Android.

It's just Linux. You need to gain root access which is either easy or impossible depending on what device you have.


----------



## nastypx86 (Apr 2, 2020)

Yes it's rooted that's the confusion.


----------



## moproblems99 (Apr 2, 2020)

nastypx86 said:


> Yes it's rooted that's the confusion.



Been a while since I have rooted android but do you need to add sudo to the command?


----------



## Solaris17 (Apr 2, 2020)

have you chmod 777 init.sh ?


----------



## nastypx86 (Apr 2, 2020)

I have no sound via HDMI. So need to edit the .sh so it will load my sound settings during the boot peocess with the following by adding these lines  below“esac”:
alsa_amixer -c0 set 'IEC958',0 on
alsa_amixer -c0 set 'IEC958',1 on
alsa_amixer -c0 set 'IEC958',2 on
alsa_amixer -c0 set 'IEC958',3 on
mv /dev/snd/pcmC0D3p /dev/snd/pcmC1D3p.original
ln -sf /dev/snd/pcmC0D7p /dev/snd/pcmC0D3p.   No have not tried chmod 777 is this a command I tpye interminal window?


----------



## Solaris17 (Apr 2, 2020)

nastypx86 said:


> No have not tried chmod 777 is this a command I tpye interminal window?



yes if you are root cd to the directory containing init.sh and then run chmod 777 init.sh 

then see if you can modify it.


----------



## moproblems99 (Apr 2, 2020)

Solaris17 said:


> yes if you are root cd to the directory containing init.sh and then run chmod 777 init.sh
> 
> then see if you can modify it.



And take note of what it is so you can chmod it back to original.


----------



## nastypx86 (Apr 2, 2020)

So I opened terminal window cd to /system/etc then typed su did a ls file is there but only is init the .sh extension is hidden I did a chmod 777 init and it stated chmod 'init' to 100777: read only file system.... I also downloaded root checker just to double check and system is rooted.


----------



## TheLostSwede (Apr 2, 2020)

Try:

```
mount -o remount /
```


----------



## moproblems99 (Apr 3, 2020)

TheLostSwede said:


> Try:
> 
> ```
> mount -o remount /
> ```



Oh that reminds me!  You do need to set up that partition as writable.  Let me find my old scripts that do that.

Edit: Nevermind, mine were all emulator and ADB.


----------



## nastypx86 (Apr 3, 2020)

I think that during the install Android x86 installed the system files  as read only and you cannot modify. Does this make sense?


----------



## moproblems99 (Apr 3, 2020)

nastypx86 said:


> I think that during the install Android x86 installed the system files  as read only and you cannot modify. Does this make sense?



It does but that is what chmod does.  In conjunction with remounting storage as writable, you should be good too.


----------



## xvi (Apr 3, 2020)

Historically, I've just used Root Explorer to edit system files. I'm sure there are free alternatives.


----------

