2019. március 25., hétfő

Gyorskeresés

T-Mobile Pulse - Reloaded v2.0

Írta: | Kulcsszavak: t-mobile pulse android linux root swap cpu ram

[ ÚJ BEJEGYZÉS ]

A cikket továbbiakban Angolul folytatom, mivel belinkelem külföldi fórumokra is.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The following modifications may VIOLATE YOUR PHONE'S WARRANTY or COMPLETELY BRICK IT. I DO NOT TAKE ANY GUARANTEES about methods described within this article.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

PURPOSE: Speed up the T-Mobile's Pulse phone, without applying a custom ROM on it. Also make some modifications to consume less power - extend on-battery runtime.

TO ACHIEVE IT: We need to root the phone, install busybox to have general linux shell commands, then replace the kernel with a smarter one (default kernel does not have swap support). Then we have to create an in-memory swap with SD card based backing swap function (to let more applications fit in phone's memory, e.g.: desktop does not have to completely reinitialize when exiting larger applications, etc.), addition with a method that lowers the wearing of our SD card (re-create it on another area of the card after every restart). Finally some variable tunings required to lower swappiness (from 60 to 10), set lower idle frequency for the CPU (from 240MHz to 120MHz - saves battery) and speed up CPU's frequency scalig when CPU usage increases (from 80% to 50% - faster responses).

Lets see...

I. Preparing

Format SD card in the phone. No ext2 or swap partitions will be needed.

Download the following files to a Windows XP (32bit) computer:

The rooting method propably wont work on 64bit OS'es...

- http://content.modaco.net/dropzone/1.1-pulse-superboot.zip
- http://content.modaco.net/dropzone/modacopatchedrecovery-1.0.zip
- http://www.anddev.org/download.php?id=449
- http://content.modaco.net/dropzone/busybox
- http://www.romraid.com/paul/pulse/1.1-update-pulse-mck-signed.zip

Extract the contents of the first archive to a folder like "c:\pulse\" (create it).
Extract the the second archives "Hero" folder contents also to "c:\pulse\".
Extract the android_usb_windows folders contents from the third archive to "c:\pulse\driver\" folder (create it).
Place the busybox file from the fourth link under "c:\pulse\busybox\" folder (create it).
Extract the contents of the fifth archive under "c:\pulse\kernel\" folder (create it).

Create the file "c:\pulse\busybox\start" with notepad, and put these lines in it:

#!/data/busybox/sh

MODULES=/data/system/modules
LOOPFILE=/dev/block/loop0
SWAPFILE=/sdcard/swapfile.swp
SWAPSIZE=49152
MEMLIMIT=12288
SWAPPY=10
CPUMIN=122880
CPUMAX=528000
CPUTHR=50

echo "[x] Loading kernel modules..."

for MODULE in tun lzo_decompress lzo_compress xvmalloc
do
if [ ! -r $MODULES/$MODULE.ko ]
then
echo " ! Failed to read: $MODULES/$MODULE.ko"
exit 1
fi
insmod $MODULES/$MODULE.ko 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to load: $MODULES/$MODULE.ko"
exit 1
fi
echo " - Loaded: $MODULES/$MODULE.ko"
done
echo " Done."

echo "[x] Rotating swap to protect SD..."

if [ -f $SWAPFILE ]
then
mv $SWAPFILE $SWAPFILE.old 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to move: $SWAPFILE to $SWAPFILE.old"
exit 1
fi
echo " - Moved: $SWAPFILE to $SWAPFILE.old"
fi
if [ ! -f $SWAPFILE ]
then
dd if=/dev/zero of=$SWAPFILE bs=1024 count=$SWAPSIZE 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to create: $SWAPFILE"
exit 1
fi
echo " - Created: $SWAPFILE ($SWAPSIZE KB)"
mkswap $SWAPFILE 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to format: $SWAPFILE"
exit 1
fi
echo " - Formatted: $SWAPFILE"
fi
if [ -f $SWAPFILE.old ]
then
rm $SWAPFILE.old 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to delete: $SWAPFILE.old"
exit 1
fi
echo " - Deleted: $SWAPFILE.old"
fi
echo " Done."

echo "[x] Creating fake block device..."

losetup $LOOPFILE $SWAPFILE 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to fake: $SWAPFILE to $LOOPFILE"
exit 1
fi
echo " - Faked: $SWAPFILE to $LOOPFILE"
echo " Done."

echo "[x] Setting up compcache..."

if [ ! -r $MODULES/ramzswap.ko ]
then
echo " ! Failed to read: $MODULES/ramzswap.ko"
exit 1
fi
insmod $MODULES/ramzswap.ko memlimit_kb=$MEMLIMIT backing_swap=$LOOPFILE 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to load: $MODULES/ramzswap.ko"
exit 1
fi
echo " - Loaded: $MODULES/ramzswap.ko"
swapon /dev/block/ramzswap0 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]
then
echo " ! Failed to swapon: /dev/block/ramzswap0"
exit 1
fi
echo " - Swapon: /dev/block/ramzswap0"
echo " Memory limit: $MEMLIMIT KB"
echo " Backing swap: $SWAPSIZE KB"
echo " Done."

echo "[x] Setting variables..."

echo $SWAPPY > /proc/sys/vm/swappiness
echo " - Swappiness: $SWAPPY"
echo $CPUMIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo " - CPU min. frequency: $CPUMIN"
echo $CPUMAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo " - CPU max. frequency: $CPUMAX"
echo $CPUTHR > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo " - CPU up threshold: $CPUTHR"

echo " Done."

exit 0

Install a terminal emulator from the Market on the phone. I prefer "Better Terminal Emulator".

Now connect the phone to the computer as a flash drive via the bundled USB cable, or put the SD card in a card reader connected to the computer.

Copy the following files to the SD card's root directory:

c:\pulse\busybox\busybox
c:\pulse\busybox\start
c:\pulse\kernel\boot.img
c:\pulse\kernel\system\lib\modules\*

II. Rooting the phone

Turn off the phone, (re-)connect it with the computer using the bundled USB cable. Press volume down and call end buttons, then turn on the phone. After a blue screen appears on it release the volume down and call end buttons.

Now Windows will install some drivers, but there will be an unknown device called "Android 1.0". Install the driver for it from "c:\pulse\driver\".

Open a command prompt:

> cd c:\pulse\
> install-superboot-windows.bat

Thats all.

Disconnect the USB cable and restart the phone - just for sure.

III. Install busybox

Open the terminal on the phone, then:

# su (it will prompt to allow root access, click yes)
# mkdir /data/system/modules
# mkdir /data/busybox/
# cd /sdcard/
# cat busybox > /data/busybox/busybox
# cat start > /data/busybox/start
# rm busybox
# rm start
# cd /data/busybox/
# chmod 4755 busybox
# chmod 4755 start
# ./busybox --install -s /data/busybox/
# rm su

In the terminal application's settings set the PATH variable to include "/data/busybox/".

IV. Replace the kernel

Restart the terminal application, then:

# su
# cd /sdcard/
# ls
# cat <every>.ko > /data/system/modules/<every>.ko
# rm <every>.ko
# cat boot.img > /data/system/boot.img
# rm boot.img
# flash_image recovery /data/system/boot.img

Now exit the terminal application, and start the Quick Boot program (installed automaticly when we rooted the phone) and click on Recovery.

The phone will boot up with the new kernel. To verify it open te terminal application, then:

# uname -a

The kernel build date should be around Dec 9, the original kernel was built in September. Now try every device (wifi, bluetooth, etc.) and some applications to make sure everything works fine. If not, then simply restart the phone, it will boot up with the original kernel.

If everything looks fine, open the terminal application, then:

#su
# flash_image boot /data/system/boot.img

Exit from the terminal and restart the phone. Now the new kernel will start after every restart.

V. Create swap, tune variables, etc.

Open the terminal application, then:

# su
# start

The start script will do all the jobs. It will take a few seconds to rotate the swap file on the SD card (to lower its wearing time). If it exists immediately, then you propably do not su'ed or already executed the script.

Note that you have to run this script after every phone restart. There are many solutions on the net to "autostart" it - if you require.

We are done.

How to get some useful informations from the terminal:

# cat /proc/ramzswap

# cat /proc/meminfo

# cat /proc/swaps

# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

# free

Cheers!

Hozzászólások

(#1) kowk


kowk
(tag)

tested, works

szerk: bar eddig se volt lassu, csak ha jatekbol vagy ilyesmibol leptem ki

[ Szerkesztve ]

(#2) Chronos6


Chronos6
(kvázi-tag)

I would be curious about the warranty voiding. Does anybody have any info about it? I mean if i root it, make swap on sd card, and the camera stops working than why would they say "we wont fix it, you've bricked it, go away!". Its a good excuse, true..

I'll put it the other way around:
If i do whatsoever whit this beauty, is it possible to 100% revert back to the original state? That the warranty will be still valid?

(#3) zooly válasza Chronos6 (#2) üzenetére


zooly
(fanatikus tag)

I think removing the applications installed during the rooting process (and flashing back the original boot.img if the kernel was upgraded) will revert the phone to its original state. If i'm wrong, then getting a full image of a new phone, then flashing it to yours will surely work.

[ Szerkesztve ]

https://www.ratingraph.com/

(#4) Chronos6 válasza zooly (#3) üzenetére


Chronos6
(kvázi-tag)

So than where can i get a rom what is from an unmodified phone? Can i make one without touching the soft? If I'm right, if i want to make a rom BU, i have to root it. End of story. Is there another way?

(Imádom hogy Magyar fórumon, Magyar emberek Angolul dumálnak :D)

(#5) zooly válasza Chronos6 (#4) üzenetére


zooly
(fanatikus tag)

van valami cyanogen recovery cucc, amit usbvel gepre kotve a telot eltudsz inditani es tudsz csinalni full backupot, meg restore is vele. en nem probaltam, de forumokon irjak hogyan mukodik pontosan. amugy azota a hw-es opelgl gyorsitast is sikerult megoldani, majd updatelem a cikket (pulsen sw-esen van letiltva a 3d gyorsitas).

https://www.ratingraph.com/

(#6) Chronos6 válasza zooly (#5) üzenetére


Chronos6
(kvázi-tag)

És van valami program amivel lehet tesztelni/mérni a 3d teljesítéményt? glxgears? :)

(#7) zooly válasza Chronos6 (#6) üzenetére


zooly
(fanatikus tag)

azt nem tudom, en marketbol toltottem 3d-s jatekokat, volt ami alapbol 1fps, hax utan 30fps..

https://www.ratingraph.com/

(#8) llaszlo


llaszlo
(PH! kedvence)

Még jó, hogy magyarok vagyunk és angolul írogatunk. Leglább annyival tisztelhetnénk a magyar nyelvet, hogy magyarul is leírjuk amit akarunk.

Én kérek egy magyar fordítást.

[ Szerkesztve ]

(#9) Chronos6 válasza llaszlo (#8) üzenetére


Chronos6
(kvázi-tag)

Èn a modaco fèle vanilla rom-ot hasznàlok, van benne minden jó ;] ha kell segitsèg szólj. Elèg könnyü feltenni, irtunk hozzà howto-t. Csak hogy maradjunk a Magyar szavaknàl :]

(#10) zooly válasza llaszlo (#8) üzenetére


zooly
(fanatikus tag)

Ötletem sincs mit lehet kezdeni egy internet hozzáféréssel Angol tudás nélkül.

https://www.ratingraph.com/

További hozzászólások megtekintése...
Copyright © 2000-2019 PROHARDVER Informatikai Kft.