Custom scripts for Archangel root for firmware 2.0.71, 2.1.02, 2.1.03, 2.1.04, 2.1.08

Search This thread

smile_gerard

Member
Jun 23, 2008
31
1
What do you mean when you say nothing is happening? What do you expect to happen? You won't see anything on the screen. And the script will only be run when the Archangel script tries to root the device.

When i use a terminal and type "free" it still shows "swap 62520"
I am able to disable swap if i do it manually. Just don't know how to get the script working.
 

wdl1908

Senior Member
Dec 18, 2010
380
156
When i use a terminal and type "free" it still shows "swap 62520"
I am able to disable swap if i do it manually. Just don't know how to get the script working.

Make sure the name of the file and directory are exactly like this

/sdcard/sdcard/extraroot.sh

Remember case is important.

There could be another problem did you create that file on a windows machine?

If yes it could be the line endings are wrong.

Install something like Notepad++ and open the file then use the format menu "Convert to UNIX Format" save the file and reupload to the device then reroot your device to activate the script
 

smile_gerard

Member
Jun 23, 2008
31
1
Make sure the name of the file and directory are exactly like this

/sdcard/sdcard/extraroot.sh

Remember case is important.

There could be another problem did you create that file on a windows machine?

If yes it could be the line endings are wrong.

Install something like Notepad++ and open the file then use the format menu "Convert to UNIX Format" save the file and reupload to the device then reroot your device to activate the script

Alright got it right this time round.
Turns out i had to put the file into the root folder of the microsd.
And also had to use notepad++
It works now thanks for the help.
 

liutszho

Senior Member
Dec 9, 2010
157
14
Why would you want these scripts to run on a fully rooted device. You can do anything you want on your device if it's fully rooted.

These scripts only make sense when used together with the Archangel root app.

Oh damn, so there are no steps to get these on a fully rooed device?

Not sure what I need to edit,

Edit: nevermind figured it out, make the extraroot.sh, then execute it in terminal
 
Last edited:

godashram

Senior Member
Feb 28, 2007
256
20
I tried the swap as well with the gun bros beta... and it made a difference. It ran smoother.

Gotta try dungeon defenders next...

Sent from my A101IT using Tapatalk
 

godashram

Senior Member
Feb 28, 2007
256
20
With 64mb swap it was a bit smoother... with 256 it was even better. No real difference if swap is located on internal or sd card for me

Sent from my A101IT using Tapatalk
 

wdl1908

Senior Member
Dec 18, 2010
380
156
Hi,
I tried to set 256 Mo and 64 Mo;
I launched a lot of apps in background to do some tests.
I got the same performance because I only use 17Mo of swap .

Hope it help...

PS : To know how much swap RAM i use, I launch "free" in terminal emulator

Yep as suspected. The swap will not work because the android part does not seem to know it has swap. The swap is only used by the native linux programs that run.
 

CarsnGadgets

Senior Member
Sep 1, 2010
295
97
Weymouth
Redmi Note 10 Pro
wdl1908,

I have created a new file in notepad++ and directly pasted in the script from your 1st post to stop the 32mb swap and create a new 256mb one on the sdcard.

swapoff /dev/block/mmcblk0p3
if [ ! -f /sdcard/sdcard/myswap ]
then
echo "Creating swap file"
dd if=/dev/zero of=/sdcard/sdcard/myswap bs=1M count=256
mkswap /sdcard/sdcard/myswap
fi
swapon /sdcard/sdcard/myswap

I have gone to the encoding menu, and I have tried both ANSI and UTF-8 formats,
but the script doesnt do anything on reboot? (the swap is still 32mb, I checked with the terminal)

the file is in /sdcard/sdcard

which encoding format do I use in notepad++? there isnt an option to 'convert to unix format'



thanks.
 
Last edited:

wdl1908

Senior Member
Dec 18, 2010
380
156
wdl1908,

I have created a new file in notepad++ and directly pasted in the script from your 1st post to stop the 32mb swap and create a new 256mb one on the sdcard.



I have gone to the encoding menu, and I have tried both ANSI and UTF-8 formats,
but the script doesnt do anything on reboot? (the swap is still 32mb, I checked with the terminal)

the file is in /sdcard/sdcard

which encoding format do I use in notepad++? there isnt an option to 'convert to unix format'

What version of Notepad++ do you use? I got the v5.1.4 Portable apps edition on my work pc. At home I use linux so no problem there.
 

CarsnGadgets

Senior Member
Sep 1, 2010
295
97
Weymouth
Redmi Note 10 Pro
Im at work now, so cant check my home pc which has it installed, but its the latest version 5.8.7 from the website.

I have just downloaded 5.1.4, so I'll try that later.

thanks.
 
Last edited:

wdl1908

Senior Member
Dec 18, 2010
380
156
Yes I use Root Explorer. And I also try to make the change via ADB with su command...

No way.

What I wanted to do was to modify the qwerty.kl and change it to azerty.kl, but it won't let me do... :(

No error message, but no change as I already said.
I also tried to copy the azerty.kl file in the same folder, but nothing happened.... ^^

You have root access but that does not mean you can copy files over the existing ones. The Filesystem is still read-only. Changing that needs a lot more changes and for the moment an SDE install.

You could possibly try the mount --bind trick maybe that will work but if the files you'r trying to replace are already loaded by the system then there is probably nothing that can be done.
 

smile_gerard

Member
Jun 23, 2008
31
1
wdl1908,

I have created a new file in notepad++ and directly pasted in the script from your 1st post to stop the 32mb swap and create a new 256mb one on the sdcard.



I have gone to the encoding menu, and I have tried both ANSI and UTF-8 formats,
but the script doesnt do anything on reboot? (the swap is still 32mb, I checked with the terminal)

the file is in /sdcard/sdcard

which encoding format do I use in notepad++? there isnt an option to 'convert to unix format'



thanks.

I've had problems with it too... I ended up downloading a swap file and dropping it into the root of my sd card. I then just keyed in this:

swapoff /dev/block/mmcblk0p3
swapon /sdcard/sdcard/swap512

swap512 is the name of the swap file that i had. Weirdly the swapoff would not work but i was able to get the 512mb swap file i had put in to work. But if i just used swapoff /dev/block/mmcblk0p3 it would work. Don't know why can't get both to work together. So i just use gscript to execute swapoff /dev/block/mmcblk0p3
 

rokkywoof

Senior Member
Jan 28, 2009
67
6
Finally we have a method to obtain root
. . .

WARNING: if you use a swapfile, which is described here, you can't use a usb connection to copy files without disabling the swap with the following command.
Code:
$su
#swapon /sdcard/sdcard/myswap

Should that not be "swapoff /sdcard/sdcard/myswap" ?? That is the only way I know of to disable swapping in Linux (and that is what you show earlier to disable the original swap).

HTH
 
  • Like
Reactions: wdl1908

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Finally we have a method to obtain root that does not involve installing the SDE and that works on at least three different firmware versions. 2.0.71, 2.1.02, 2.1.03, 2.1.08. For all the details see http://xdaforums.com/showthread.php?t=928767
    This program has the possibility to execute a script after root is acquired. See the readme.txt of Archangel v2.
    You can create a script in /sdcard/sdcard/extraroot.sh and this will be executed as root
    whenever you reboot, so you can use this to do any additional root functions you want.
    If you make an error with this script which causes you a problem then you can eject your
    sd card and reboot and it then will not execute.

    NOTE: For windows users. Please use Notepad++ to edit the extraroot.sh and convert the file to unix format. In the menu choose "Format" -> "Convert to UNIX Format". This option is available with version v5.1.4 of Notepad++ it has been reported that it's not available in other versions.

    Please post the firmware version, your script and a little description here.

    Firmware 2.1.02, 2.1.03, 2.1.04,2.1.08 - Disable Swap

    Swap is automatically enabled in these firmware versions.
    Code:
    swapoff /dev/block/mmcblk0p3
    To verify that swap is turned off go to the Terminal Emulator and type free
    Code:
    / $ free
                  total         used         free       shared      buffers
      Mem:       243824       230972        12852            0         4332
     Swap:            0            0            0
    Total:       243824       230972        12852

    Another way to turn off swap permanently without using the a script is to disable the swap service. This can be done from within the Terminal Emulator with the following commands
    Code:
    $su
    #setprop persist.sys.archos.swapctl.en 0
    Then reboot the device.
    This only needs to be done once.

    Firmware 2.0.71, 2.1.02, 2.1.03, 2.1.04, 2.1.08 - Disable ads

    Disable ads. This was posted by archaism1 here http://xdaforums.com/showthread.php?p=10941853#post10941853
    Code:
    cat <<EOF >/tmp/hosts
    127.0.0.1 localhost
    127.0.0.1 pagead2.googlesyndication.com pagead.l.google.com googleads.g.doubleclick.net
    127.0.0.1 api.admob.com mm.admob.com r.admob.com mob.adwhirl.com cus.adwhirl.com met.adwhirl.com
    EOF
    mount --bind /tmp/hosts /etc/hosts
    I have not tested this myself because I think the devs of applications need the ads to make some money.

    Firmware 2.1.02, 2.1.03, 2.1.04, 2.1.08 - Swap on sd-card

    Disable swap on internal storage and create a swap file on sd-card. The swap is 256Mb big to change the size just adjust the 256 value in the script.

    ATTENTION: it can take a few minutes the first time the script is executed.
    Code:
    swapoff /dev/block/mmcblk0p3
    if [ ! -f /sdcard/sdcard/myswap ] 
      then
        echo "Creating swap file"
        dd if=/dev/zero of=/sdcard/sdcard/myswap bs=1M count=256
        mkswap /sdcard/sdcard/myswap
    fi
    swapon /sdcard/sdcard/myswap
    And here the result of free
    Code:
    # free
                  total         used         free       shared      buffers
      Mem:       243824       241432         2392            0         6232
     Swap:       262136          320       261816
    Total:       505960       241752       264208

    WARNING: if you use a swapfile, which is described here, you can't use a usb connection to copy files without disabling the swap with the following command.
    Code:
    $su
    #swapoff /sdcard/sdcard/myswap
    Credit for this goes to http://forum.archosfans.com/viewtopic.php?f=74&t=42718

    Hondaracer posted some scripts I'll include them as attachments
    5
    Here are some pre-made extraroot.sh files for those who don't have NotePad++ or other reason.
    1
    Advanced stuff.

    Loading kernel modules.

    There was a post in another thread about CifsManager here
    chulri was so kind as to build the module. You can download it here.

    Unzip the downloaded file and place it in a directory under /sdcard I suggest /sdcard/modules/

    Add the following code to the extraroot.sh
    Code:
    insmod /sdcard/modules/cifs.ko
    and reboot.
    Now you can install CifsManager and start mapping drives.
    1
    I have to create a file named extraroot.sh and and put it in /sdcard/sdcard ?
    Do I need to make it executable ? (chmod +x)
    Does it work only with permanent root ?
    Thanks :)
    1
    So, I just have to copy the hosts file on SD card, that's all?

    And could you please give me an actual hosts file?

    There is one here copy that hosts file to /etc/hosts