Apply settings at boot - HD2 Android Q&A, Help & Troubleshooting and Genera

Hey guys ive ran into an hunch . Using adb or terminal emulator i am completely able to change the following values/settings .
the path to these files below is: /sys/devices/system/cpu/cpufreq/smartass/
the files im trying to edit at boot are:
awake_ideal_freq
max_cpu_load
min_cpu_load
ramp_up_step
sleep_ideal_freq
however every time i reboot i dont want to have to go into terminal or adb and re-apply my settings .
i already tried using an init.d script , the script i have is as follows:
Code:
#!/system/bin/sh
echo "smartassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sleep(2)
echo "729600" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq
echo "95" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load
echo "80" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load
echo "19200" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step
echo "96000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq
i have a feeling SetCPU or something is reverting the settings back to default . If i wrote an APK with the settings i want would i be able to have that start on boot to apply my settings ? or is there a way to have a script run post-boot ?

Try script manager to run the script at boot.
Sent from my HTC HD2 using xda premium

showlyshah said:
Try script manager to run the script at boot.
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
Thanks but that doenst work i wrote a bash script as follows ..
Code:
echo "729600" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq
echo "95" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load
echo "80" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load
echo "19200" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step
echo "96000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq
cat /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq
sleep(5)
cat /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load
sleep(5)
cat /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load
sleep(5)
cat /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step
sleep(5)
cat /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq
sleep(5)
And it gives me this error when trying to run it in script manager .
Code:
exec sh '/mnt/sdcard/Set_SmartassV2_settings.sh'
# exec sh '/mnt/sdcard/Set_SmartassV2_settings.sh'
/mnt/sdcard/Set_SmartassV2_settings.sh: cannot create /sys/devices/s: directory nonexistentass/awake_ideal_freq
/mnt/sdcard/Set_SmartassV2_settings.sh: cannot create /sys/devices/s: directory nonexistentass/max_cpu_load
/mnt/sdcard/Set_SmartassV2_settings.sh: cannot create /sys/devices/s: directory nonexistentass/min_cpu_load
/mnt/sdcard/Set_SmartassV2_settings.sh: cannot create /sys/devices/s: directory nonexistentass/ramp_up_step
/mnt/sdcard/Set_SmartassV2_settings.sh: cannot create /sys/devices/s: directory nonexistentass/sleep_ideal_freq
: No such file or directoryfreq/smartass/awake_ideal_freq
/mnt/sdcard/Set_SmartassV2_settings.sh: 8: Syntax error: word unexpected (expecting ")")
I think im missing something cause it works just fine in terminal emulator or adb ..

Mount sys as rw. I think u miss it. System os ro when u reboot
Sent from my HTC HD2 using xda premium

showlyshah said:
Mount sys as rw. I think u miss it. System os ro when u reboot
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
Duhhh how could i miss that . gah . even though adding
mount -w -o remount /system
still leaves with the same error . right now im using a batch file when im connected to adb . would really love to get this working ! lol

elesbb said:
Duhhh how could i miss that . gah . even though adding
mount -w -o remount /system
still leaves with the same error . right now im using a batch file when im connected to adb . would really love to get this working ! lol
Click to expand...
Click to collapse
elesbb this script install may give you a idea
http://forum.xda-developers.com/showthread.php?t=1011742

carl1961 said:
elesbb this script install may give you a idea
http://forum.xda-developers.com/showthread.php?t=1011742
Click to expand...
Click to collapse
Thanks carl ! However that just enables the governor for those who dont have the option already . Which running latest and greatest dorimanx kernel we dooo
But as an overall update i managed to get it working , how ? i havent the slightest idea i just simply started over . i did compare the two scripts and i noticed sleep(2) was causing an error so i just omitted it all together . And running it via script manager applied the settings . And having it run at boot also worked . i tried once again the init.d script and i created another directory with the same files . and the init.d script worked . Its just there is another app resetting those values AFTER the init.d scripts are ran . my guess is SetCPU .
My next goal is to be able to have my settings applied at boot without having scriptmanager running . to me its just another useless process having to be ran at boot . lol . maybe i'll include in my script a kill command to kill the script manager app once its ran .
Thanks to all who have contributed to my brain storming

Create an init.d script to set values on boot. Else an init.d script to run a script.sh stored in a folder in card or phone
Sent from my HTC HD2 using xda premium

showlyshah said:
Create an init.d script to set values on boot. Else an init.d script to run a script.sh stored in a folder in card or phone
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
Init.d scripts dont work , because after the init.d script runs , something else runs afterwards which overwrites the settings which were set by the init.d script . what i need is something that will run POST boot . like after init.d scripts and apps have ran

elesbb said:
Init.d scripts dont work , because after the init.d script runs , something else runs afterwards which overwrites the settings which were set by the init.d script . what i need is something that will run POST boot . like after init.d scripts and apps have ran
Click to expand...
Click to collapse
I know its a dump quest. But what kernal r u using? Is it have wakelock dissabled? And also insted of setcpu, u can try voltage control or no frills cpu.
Sent from my HTC HD2 using xda premium

showlyshah said:
I know its a dump quest. But what kernal r u using? Is it have wakelock dissabled? And also insted of setcpu, u can try voltage control or no frills cpu.
Sent from my HTC HD2 using xda premium
Click to expand...
Click to collapse
I figured it out . i used an init.d script to change my values , then using same script , i changed the permissions of the files to read only and it worked .

elesbb said:
I figured it out . i used an init.d script to change my values , then using same script , i changed the permissions of the files to read only and it worked .
Click to expand...
Click to collapse
So u dont actualy figured it out what is causing the rivert back. But u did is building a wall in b/w. By changing the file to RO.... King is still weak.. only the castles are strong! !!
Sent from my HTC HD2 using xda premium

Related

/system/etc/init.d folder, why scripts don't start at boot?

hi all!
i have put a script "99complete"
(
Code:
#!/system/bin/sh
sync;
setprop cm.filesystem.ready 1;
sleep 500
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/sensitivity
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/noise
)
in /system/etc/init.d
but when i boot my phone the script doesn't start...
i have Vachounay 1.0.1 Rom and Acer Liquid S100
any suggestion?
Probably the script isn't executable. Do "chmod +x" on file
-------------------------------------
Sent via the XDA Tapatalk App
I nave already tryed it...
Did you use linux to make the scripts? Scripts don't work if made with windows (unless you use notepad++)
does sleep 500 mean 500/60 ~=8+minutes??? I wonder why u wud wait 8 minutes for executing your script...Give it a try with say sleep 250 ..Wonder if that might be it..rest appears okay to me
Suxsem said:
hi all!
i have put a script "99complete"
(
Code:
#!/system/bin/sh
sync;
setprop cm.filesystem.ready 1;
sleep 500
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/sensitivity
echo 25 > /sys/devices/platform/i2c-adapter/i2c-0/0-005c/noise
)
in /system/etc/init.d
but when i boot my phone the script doesn't start...
i have Vachounay 1.0.1 Rom and Acer Liquid S100
any suggestion?
Click to expand...
Click to collapse
If you edit the script on Windows then use notepad++ and make sure you select "Unix format" under Edit -> EOL Conversion. Also, leave an empty line at the end of the file.
It could also be that whatever ROM you are using does not support init.d scripts.
Check out ScriptManager. It's a little easier way to run stuff at boot, etc..
I found it when I couldn't get my tun.ko module inserted at boot..
https://market.android.com/details?id=os.tools.scriptmanager

[Q] Wifi MAC Fix?

Solved: See post #4
Obviously for those with a modded kernel and broken MAC.
If we knew the real MAC address for the specific device, couldn't we set the module's MAC to our real one?
Or just a MAC spoofer? But more like an un-spoofer..
Im looking for the answer as well...
I have been through every oc kernel so far, only stock/insmod seems to keep the mac addy. This might be the best option until a proper solution is found, if anyone has an idea on how to insmod on startup that would be good.
I also tried ipconfig eth0 hw ether, but got an invalid argument.
tijuanacartel said:
Im looking for the answer as well...
I have been through every oc kernel so far, only stock/insmod seems to keep the mac addy. This might be the best option until a proper solution is found, if anyone has an idea on how to insmod on startup that would be good.
I also tried ipconfig eth0 hw ether, but got an invalid argument.
Click to expand...
Click to collapse
Can't you setup a script that insmod's and set that up to run on startup?
I'm sure there is somewhere in the ROM where a script can be added for it to run on boot, or at least a boot time Android one...
init.rc perhaps?
Okay i found it... there is a file called /bootcomplete.rc that calls
/system/xbin/busybox run-parts /system/etc/init.d
so, on stock kernel with oc-dz.ko:
Code:
# cd /system/etc/
# mkdir init.d
# cd init.d
# echo insmod /system/lib/modules/oc-dz.ko pll2_l_val=74 > overclock
# chmod 0755 overclock
will load the module at boot. wifi mac is correct
Okay I've been using this for most of the day and just had a hard crash on level 99 of robo defence(F7U13!) Looking into it, it seems this kernel module only seems to step up from 700 straight to 1497! I'm disabling it for now.
Apparently cyanogen is quite a lot faster than the stock Sense, even without overclock. As soon as it hits RC2, I'm gonna give it a shot.
tijuanacartel said:
Okay i found it... there is a file called /bootcomplete.rc that calls
/system/xbin/busybox run-parts /system/etc/init.d
so, on stock kernel with oc-dz.ko:
Code:
# cd /system/etc/
# mkdir init.d
# cd init.d
# echo insmod /system/lib/modules/oc-dz.ko pll2_l_val=74 > overclock
# chmod 0755 overclock
will load the module at boot. wifi mac is correct
Click to expand...
Click to collapse
EDIT
Trying from a Terminal I get: "undable to chmod overclock: Read-only file system"
I tryed from ADB and all commands were accepted, file was created and chmod processed, but after reboot the OC module is not loaded
What ROM are your using ??
Obviously you should remount your system partition rw
tijuanacartel said:
Obviously you should remount your system partition rw
Click to expand...
Click to collapse
OMFG I really need to sleep a little
What ROM are you using ?? Have you changed the Kernel ??
at the time i was using stock.. currently using virtuous from rom manager
I've been strugglin with that command line for days, trying to find a way t make it stick from boot (and not typing it from a console), I finaly made it today via updater script (update.zip).
I also included the stock radio module and the stock kernel (rooted) to the package, so it can serve as a "rescue kit" for other users stuck with the MAC WiFi shizz. I shared it @ devs forum.

HTC AdFree Fix

Here's a small program for windows to automatically link the AdFree hosts file on the sdcard to the system hosts file. This should fix issues with AdFree not working for peope with HTC phones. You must have CWM and the Android SDK installed in"C:\Android\". Just extract the program and run it.
How is it applied? I downloaded and saw its a zip. Do we flash it?
Sent from my Incredible using XDA App
Gahh Its Lee said:
How is it applied? I downloaded and saw its a zip. Do we flash it?
Sent from my Incredible using XDA App
Click to expand...
Click to collapse
Its an EXE inside the zip -- so run it on your Windows PC. It looks like it might use ADB. In that case you'll need the Android SDK installed (or adb.exe etc in the folder with it).
Run the program on your PC and follow its directions.
Adfree already works fine on my N1 -- just trying to clarify a bit.
Thanks for the contribution. I'm sure HTC owners will really appreciate it.
KillerBeaver said:
Here's a small program to automatically link the AdFree hosts file on the sdcard to the system hosts file. This should fix issues with AdFree not working for peope with HTC phones.
Click to expand...
Click to collapse
Your postcount is 1 and you attach an executable???
Sorry...I don't trust you.
I'm on from mobile so I didn't catch that but yea that doesn't make sense
Sent from my Incredible using XDA App
mik101 said:
Its an EXE inside the zip -- so run it on your Windows PC. It looks like it might use ADB. In that case you'll need the Android SDK installed (or adb.exe etc in the folder with it).
Run the program on your PC and follow its directions.
Adfree already works fine on my N1 -- just trying to clarify a bit.
Thanks for the contribution. I'm sure HTC owners will really appreciate it.
Click to expand...
Click to collapse
Correct. The instructions are shown as soon as you run the executable. You will need to the android sdk installed to your root drive. Then just follow the instructions. It works on my HTC Aria. I don't have any other HTC phones to test it on. Basically I just made an executable to save time when i switched between ROMs. Figured it might make things simpler for people who cant get adFree to work on their phones by default.
I used to use this to get adfree working, not a problem now as I have s-off.
Is s-on why adfree don't work on other HTC devices, I don't know I've only ever had a desire. If it is flashing the zip attached here should work too, doesn't require adb or anything.
mercianary said:
Your postcount is 1 and you attach an executable???
Sorry...I don't trust you.
Click to expand...
Click to collapse
Antivirus > You
Check something out yourself before you fear monger.
mik101 said:
Antivirus > You
Check something out yourself before you fear monger.
Click to expand...
Click to collapse
I did check it (before I posted), and it came up clean. But I still stand by what I said.
I don't run code on my hardware unless it comes from a reputable source or I can see what its doing before it does it, ie a script.
I'm not fear mongering at all, I said nothing of a virus or anything malicious (intended or not) at all, I only let my opinion be known and let others make their own mind up.
Its cool. I understand your concern. I just used a compiler to convert the batch file i wrote. It's old school, but it gets the job done. Here it is if you wanna see what's goin on.
Code:
@echo off
title HTC AdFree Fix
cd C:\android\platform-tools
rem Tommy Arnold
rem (CC-BY-NC-SA) 2011
echo -------------------------------------------------------------------------
echo AdFree Fix for HTC w/ Clockwork Recovery
echo -------------------------------------------------------------------------
echo Note:
echo You must have the Android SDK installed to the root of your hdd for
echo this fix to work. Also be sure USB Debugging is enabled in Android.
echo.
echo 1. Search for Adfree Android on the market
echo.
echo 2. Install and run
echo.
echo 3. Allow it to download and install new hosts file,
echo it will copy it to your sdcard and try to replace
echo /system/etc/hosts but fail (it should reboot the phone shortly)
echo.
echo 3a. If phone doesn't reboot check your SD card for a file simply named
echo "hosts". If it's there, then continue.
echo.
echo 4. Connect USB and press any key to boot into clockwork recovery volume.
echo.
pause
cls
echo -------------------------------------------------------------------------
echo Rebooting into Clockwork Recovery Volume
echo -------------------------------------------------------------------------
echo.
echo Please wait...
echo.
adb reboot recovery
ping -n 13 127.0.0.1 > nul
else
cls
echo -------------------------------------------------------------------------
echo Fixing AdFree for HTC
echo -------------------------------------------------------------------------
echo.
echo Please wait...
adb shell mount /system
adb shell mount /data
adb shell mount /sdcard
adb shell cp /sdcard/hosts /data/data/hosts
adb shell mv /system/etc/hosts /system/etc/hosts.bak
adb shell ln -s /data/data/hosts /system/etc/hosts
adb reboot
adb kill-server
cls
echo -------------------------------------------------------------------------
echo AdFree fix for HTC has completed
echo -------------------------------------------------------------------------
echo.
echo When your phone reboots try AdFree again, it should work! :)
echo.
pause
I reuploaded it today cuz i accidentally forgot to kill the adb server after it was finished. Either way, it works.
I tried this on my HTC Evo and it didn't work. I still receive the ads when in Pandora.
Even after downloading and installing the host file in ad free again?
Sent from my HTC Liberty using XDA App
try this
work wery well >>> http://forum.xda-developers.com/showthread.php?p=10045849#post10045849
KillerBeaver said:
Here's a small program to automatically link the AdFree hosts file on the sdcard to the system hosts file. This should fix issues with AdFree not working for peope with HTC phones.
Click to expand...
Click to collapse
Works for me. THANKS !

[HOWTO] Dalvik2Cache 90MB extra Space for Apps

found this http://forum.xda-developers.com/showthread.php?t=1174160 here in the forum, but cant get it to work on my neo
after a little seaching i found an other script that seems to work on NEO maybe on ARC too
also install-recovery.sh isnt execute on my neo so i put the call into hw_config.sh and it works fine now
howto.
1. push dalvik2cache /system/bin/dalvik2cache
2. adb shell
3. chmod 755 /system/bin/dalvik2cache
4. echo "/system/bin/dalvik2cache" >> /system/etc/hw_config.sh
5. reboot
btw. you need an inscured adb or an insecure kernel like this -> http://forum.xda-developers.com/showthread.php?t=1197263
if you do that, then at your own risk, do not complain when your phone is broken
hi,
i think it should also work without insecure adb and with stock kernel.
but root is needed...
copy the dalvik2cache file to sdcard first
with rootexplorer copy file to system/bin
set permissions
edit the hw_config.sh with editor (rootexplorer)
works great, thanks!
since my kernel supports init.d binaries/scripts u can actually just push it to /etc/init.d/ OR /system/etc/init.d/
it should work... though u may need to verify permissions... chmod 777 is best bet
DooMLoRD said:
since my kernel supports init.d binaries/scripts u can actually just push it to /etc/init.d/ OR /system/etc/init.d/
it should work... though u may need to verify permissions... chmod 777 is best bet
Click to expand...
Click to collapse
can you please post 1,2,3,4 simple guide to make this work with you fantastic kernel Doomlord?
i really need more space for apps
@inteks: what are the cons of this dalvik2cache? if there are cons
Alejandrissimo said:
@inteks: what are the cons of this dalvik2cache? if there are cons
Click to expand...
Click to collapse
i found out that some apps dont work just after install they need a reboot before they work ?!?!
dont know why!
DooMLoRD said:
since my kernel supports init.d binaries/scripts u can actually just push it to /etc/init.d/ OR /system/etc/init.d/
it should work... though u may need to verify permissions... chmod 777 is best bet
Click to expand...
Click to collapse
i placed a scipt in /etc/init.d/ but it isnt execute on startup ...
ps:
the script is startable and permissons should be ok.
if i place the name of that script (/etc/init.d/start.sh) at the end of hw_config.sh then its executet on startup
Hi friends,
I've been trying to do this but I really don't know how to use adb. I have Android SDK installed on my computer, and fastboot, flash...ect. But every time I type "adb remount" then I get the answer is 'adb' is not found (blah blah blah...).
Plus my phone can't boot to recovery. Anyone please tell me where can I find the instruction how to do it? I really want to have more space for my phone and move all installed apps to sd card (I also have my sd card partitioned with ext3 and fat32).
Many thanks in advance.
Saigonian said:
I've been trying to do this but I really don't know how to use adb.
Click to expand...
Click to collapse
Have a look at first post in this thread - you have to copy two files
Saigonian said:
Plus my phone can't boot to recovery.
Click to expand...
Click to collapse
You will have to unlock your phone first and then, using adb, install a custom kernel by fx. DooMLoRD from the link in my signature.
I dont know how to use cmd, can I use Root Explorer?
Anyway to revert it back? Because few apps are missing after it's done.
inteks said:
found this http://forum.xda-developers.com/showthread.php?t=1174160 here in the forum, but cant get it to work on my neo
after a little seaching i found an other script that seems to work on NEO maybe on ARC too
also install-recovery.sh isnt execute on my neo so i put the call into hw_config.sh and it works fine now
howto.
1. push dalvik2cache /system/bin/dalvik2cache
2. adb shell
3. chmod 755 /system/bin/dalvik2cache
4. echo "/system/bin/dalvik2cache" >> /system/etc/hw_config.sh
5. reboot
btw. you need an inscured adb or an insecure kernel like this -> http://forum.xda-developers.com/showthread.php?t=1197263
if you do that, then at your own risk, do not complain when your phone is broken
Click to expand...
Click to collapse
I'm sorry was that a typo? When your phone gets broken! Or if?
Sent from my LT15i using XDA Premium App
Hi harfot,
Thank you so much! I have it done now! But I wonder why the free space in my phone is now still the same (184MB - Because I only have a few apps installed).
inteks said:
hi,
i think it should also work without insecure adb and with stock kernel.
but root is needed...
copy the dalvik2cache file to sdcard first
with rootexplorer copy file to system/bin
set permissions
edit the hw_config.sh with editor (rootexplorer)
Click to expand...
Click to collapse
hey! This sounds like a best solution if you dont want to unlock the bootloader. But I am not too advanced user yet, could you please explain me this one with more details? actually I only need to know
1). which permissions exactly need to be set and
2). what to write inside the hw_config.sh file
Any help appreciated!
bump! no one has any ideas?
Thanks it's work in arc

[Q] Xperia X8 and Debian

Hi!
Since last week I'm trying to run Debian on Xperia X8. I've already googled a bit and didn't found any information about this topic so I'm now trying the tutorials available for G1, Nexus One an Xperia X10 but with no luck.
Right now I'm stuck after installing Debian on my X8 running Floyo 0.30, because I'm not able to run it - after executing "sh /sdcard/debian/bootdeb" (of course as a root) I receive error:
chroot: can't execute '/bin/bash': No such file or directory
Click to expand...
Click to collapse
Did someone face similar problem ? Or maybe You got some information, that running Debian on X8 is impossible ? I would appreciate any help.
Thanks in advance,
Chris.
krzysiek_grucha said:
Hi!
Since last week I'm trying to run Debian on Xperia X8. I've already googled a bit and didn't found any information about this topic so I'm now trying the tutorials available for G1, Nexus One an Xperia X10 but with no luck.
Right now I'm stuck after installing Debian on my X8 running Floyo 0.30, because I'm not able to run it - after executing "sh /sdcard/debian/bootdeb" (of course as a root) I receive error:
Did someone face similar problem ? Or maybe You got some information, that running Debian on X8 is impossible ? I would appreciate any help.
Thanks in advance,
Chris.
Click to expand...
Click to collapse
Hello again!
I fought very well since yesterday and today I can tell You guys that I think it is working . I didn't test it much, but I can log into Debian, so that's somthing to start with .
First of all please notice, that this is not my port of Debian Linux, I just followed instructions available at (link was here) and it worked for me so I'm describing the whole process so maybe someone else will use it.
Unfortunatelly I was not able to post links in this guide due to XDA-DEVELOPERS.COM policies. I apologize authors of guides/startup scripts for removing their homepages. I will correct it as soon as I will be able to post links in my replies. If You need the links send me a PM and I will send it to You.
The guide from the above link is for HTC Dream (I guess), but it is also working on my Xperia X8 with Floyo 0.30 (Thanks to Racht !). I'm not sure if it will work on stock Xperia X8 ROM, but You can try.
Please also notice, that I'm not responsible for any damage to Your software/hardware caused by this guide. You're doing everything at Your own responsibility!
Before continuing You must know, that this guide is only for ROOTed devices. You wont be able to do anything without root access.
Perform a full system backup via xRecovery before doing anything. It'll help You to restore the system if something will go wrong.
So, after the short intro we should get going with the guide:
1) First of all follow the instructions available at (link was here) to download the Debian package (I tested it for 750 version of this package, but I think it'll work for 1,5GB also - the only difference is in the space available in You Debian installation after running it).
2) After downloading run /sdcard/debian/installer.sh as described in the above guide. I actually don't know what it is doing, but it is important to run it from for e.g. adb shell (please remember to check "USB Debugging" in Settings->Applications->For programmers before connecting via adb shell). Why it is important to do it this way ? Because I did it like this and it is working .
3) Now, I don't know if this is really important, but looking on the startup scripts for Ubuntu from Xperia X10 I changed my startup script (/sdcard/debian/bootdeb) in the following way:
# Based on Saurik's remount.sh - modified by Mark Walker of
# Email
modprobe ext2
clear
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "Android Filesytem remounted as read/write"
export kit=/sdcard/debian
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
# busybox insmod ext2
mknod /dev/loop255 b 7 255
clear
echo " "
echo " a888a "
echo " d888888b "
echo " 8P YP Y88 "
echo " 8|o||o|88 "
echo " 8. .88 "
echo " 8 ._. Y8. "
echo " d/ 8b. "
echo " .dP . Y8b. "
echo " d8: ::88b. "
echo " d8 Y88b "
echo " :8P :888 "
echo " 8a. : _a88P "
echo " ._/ Yaa_ : .| 88P| "
echo " \ YP | 8P \. "
echo " / \._____.d| .| "
echo " --..__)888888P ._.|"
echo " "
echo " "
mount -o loop,noatime $kit/debian.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
echo "Custom Linux Pseudo Bootstrapper V2.1 - by Mark Walker"
echo "WEB: "
echo "EML: "
echo " "
sleep 1
echo "Starting init process"
sleep 1
echo "INIT: Debian booting....."
sleep 1
echo "Running Linux Kernel"
sysctl -w net.ipv4.ip_forward=1
sleep 1
echo "AutoMounter started"
sleep 1
echo "Type EXIT to end session"
echo "Make sure you do a proper EXIT for a clean kill of Debian!"
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Debian........"
sleep 1
fuser -k /data/local/mnt
#busybox umount -f /data/local/mnt/dev/pts /data/local/mnt/proc /data/local/mnt/sys
#busybox umount /data/local/mnt
fuser -k /dev/block/loop2
#losetup -d /dev/block/loop2
echo "Processes killed......"
echo "Loopback device shutdown - success"
echo "Debian down"
echo "Coded by Mark Walker"
echo ""
echo ""
echo " "
echo "Rebooting device to ensure clean takedown........."
sleep 2
reboot
Click to expand...
Click to collapse
As You can see I only modified line:
mknod /dev/loop255 b 7 255
Click to expand...
Click to collapse
Because I was not sure if the loop2 device (it is set by default in this script) is free in Xperia X8 so I used loop255.
4) Now we'll proceed to the part which is causing the most of problems - Debian startup. The above guide for HTC Dream suggest us to run a command:
su
sh /sdcard/debian/bootdeb
Click to expand...
Click to collapse
In every terminal You are able to run (including Terminal Emulator for Android, adb shell etc.), but I'm telling You, that these methods will fail and will cause Your phone to reboot after few seconds. Don't worry, I shouldn't brick X8, but as I said I cannot guarantee nothing. Every single case is different.
I suggest You to install SSHDroid from the Market, run it and allow it tu run as a superuser, then download Putty to Your PC and log in into Your Xperia X8 as a root (with "admin" as a default password, unless You changed it) and run the command from Putty:
su
sh /sdcard/debian/bootdeb
Click to expand...
Click to collapse
It's done ! You're logged into Debian, now try to test the new environment, because I'm not sure what can be done in this installation .
I will now proceed to install VNC server in my Debian and maybe some GUI to access it later, but I'll post any new results if there will be some .
Hey guys id love to try this on my phone could one of you maybe make a more noob-friendly guide and also this should be on developement forum but awesome work guys
Sent from my X8 using XDA Premium App
dmcb123 said:
Hey guys id love to try this on my phone could one of you maybe make a more noob-friendly guide and also this should be on developement forum but awesome work guys
Sent from my X8 using XDA Premium App
Click to expand...
Click to collapse
Hi !
I'll prepare something more friendly as soon as I'll have 10 or more posts . As for now I must tell You that it REALLY ROCKS ! I've already set up Debian to run as a web server with Apache (hahaha !) so it looks to be fully functional on X8. Now I'm fighting with setting up FTP server and soon I will show You my first web page set up on Android device .
krzysiek_grucha said:
Hi !
I'll prepare something more friendly as soon as I'll have 10 or more posts . As for now I must tell You that it REALLY ROCKS ! I've already set up Debian to run as a web server with Apache (hahaha !) so it looks to be fully functional on X8. Now I'm fighting with setting up FTP server and soon I will show You my first web page set up on Android device .
Click to expand...
Click to collapse
Aw man you're teasing me not fair haha well i really hope this picks up speed and im sure if it was posted in developement section a lot of people would be interested
dmcb123 said:
Aw man you're teasing me not fair haha well i really hope this picks up speed and im sure if it was posted in developement section a lot of people would be interested
Click to expand...
Click to collapse
So, I think I need to "spam" a little in this thread to get these 10 posts so I'll be able to move to Development section
Hope the Admin won't be angry on me
1 left to go...
And that's it ! Today I'll move to Development section, but please give me some time to prepare some "User friendly" guide. I'll try to upload some screen shots and the most important one - the corrected startup script which will let You to run Debian without the trick with "SSHDroid", but directly from Your terminal emulator. I'll post the link to the thread on Development section in this thread as soon as it'll be finished.
Hmmmm... Still can't post on Devs...
comment on some useless topics.
Can i ask what is debian?
Sent from my X8 using Tapatalk
proadi96 said:
Can i ask what is debian?
Sent from my X8 using Tapatalk
Click to expand...
Click to collapse
Hi proadi96 !
Debian is a Linux distribution (http://www.debian.org/index.pl.html). It's an operating system.
krzysiek_grucha said:
Hi proadi96 !
Debian is a Linux distribution (http://www.debian.org/index.pl.html). It's an operating system.
Click to expand...
Click to collapse
so, what's the benefit of having debian on our phones?
SpyderX said:
so, what's the benefit of having debian on our phones?
Click to expand...
Click to collapse
Hi SpyderX!
Actually for normal user there's no benefit at all. Unfortunatelly I'm not a normal user and what I'm trying to do is to port aircrack-ng to Android.
Aircrack-ng is a WEP cracking utility which will allow me to wardrive a little bit . But to gain that I first needed to install Debian to recompile aircrack-ng for ARM so I'll be able to run it .
krzysiek_grucha said:
Hi SpyderX!
Actually for normal user there's no benefit at all. Unfortunatelly I'm not a normal user and what I'm trying to do is to port aircrack-ng to Android.
Aircrack-ng is a WEP cracking utility which will allow me to wardrive a little bit . But to gain that I first needed to install Debian to recompile aircrack-ng for ARM so I'll be able to run it .
Click to expand...
Click to collapse
Well, I´m not a dev, but as I can see, you don´t need debian running on X8 to do this. You just need android sources and setup the environment to build your app, and then pack it as an apk file. The processor you may define it during the program compilation phase. (as a flag to the compiler).
biscoitu said:
Well, I´m not a dev, but as I can see, you don´t need debian running on X8 to do this. You just need android sources and setup the environment to build your app, and then pack it as an apk file. The processor you may define it during the program compilation phase. (as a flag to the compiler).
Click to expand...
Click to collapse
Hello biscoitu !
I'm also not a developer, so I tried my best to satisfy my requirements. That's the solution which I've found out . Your solution is much simplier, but today I'm a little bit tired, but proud of myself, because I've got what I wanted
dmcb123 said:
Aw man you're teasing me not fair haha well i really hope this picks up speed and im sure if it was posted in developement section a lot of people would be interested
Click to expand...
Click to collapse
As I promised I prepared some more "newbie friendly" guide. It is available at: http://forum.xda-developers.com/showthread.php?p=17379419#post17379419.
I hope I will help someone facing issues with Debian installation .
Hello... Can you inform me if wep.cracking works? I mean are there drivers for mobiles? I like the idea, what about backtrack?
Sent from my LT15i using xda premium
shtreber said:
Hello... Can you inform me if wep.cracking works? I mean are there drivers for mobiles? I like the idea, what about backtrack?
Sent from my LT15i using xda premium
Click to expand...
Click to collapse
Hi shtreber!
Unfortunatelly I didn't find any drivers for WiFi card in X8 which are able to inject packets or set up the interface in monitor mode, but I'm not the first one who had such idea. Debian on X8 is a very "fresh" topic, but on other devices like HTC for e.g. it is working since some time, so I think the developers will be able to prepare some drivers in the future.
As for the BackTrack Linux I think it should be possible to run this distribution just like Debian, because as I said in one of the previous posts it seems to be an "universal" way to run Linux on Android. There can be some minor changes which should be easy to fix. Only thing which will change is the debootstrap image of Linux filesystem which You'll mount into Android. I even found some information on the internet, where user actually ran BackTrack on his device. If I'm not mistaken it was X10.
Right now I'm preparing to run Ubuntu on X8. If I'll be able to do this it means that every distribution (which is ready to run on ARM platform like Debian) is installable on Android. I will keep You informed about progress.

Categories

Resources