[KERNEL] SpeedMod S3 ICS [K1-8 ExFAT] [K1-6B ROOT BRIGHTNESS+] - Galaxy S III Original Android Development

Hi guys,
This is the SpeedMod kernel for the Samsung Galaxy S3 GT-I9300.
SpeedMod's core features are:
- Super stable: No undervolting, overclocking or potentially unstable modifications
- Fast and smooth: Compiler and code optimizations
- Excellent battery life: Remove unecessary logging and debugging
>>> CLICK HERE for more info and the DOWNLOAD links.
>>> CLICK HERE for the Frequently Asked Questions list.
Current features:
Root:
- Automatically installs root (SuperUser and su) but can be disabled
Screen and misc tweaks:
- Auto-brightness increased slightly (in low-to-mid light)
- MDNIE screen sharpness and color tuning (improves text readability)
- init.d, TUN, CIFS, IPV6 Privacy support
Performance:
- CPU governor tweaks: increase responsiveness
- IO tweaks
- Read ahead tweaks
- Compiled with optimizations using Codesourcery GCC toolchain
- Optimized GPU DVFS
- ARM CPU topology support
- SCHED_MC multi-core aware scheduler
Turned off unnecessary logging for better smoothness and efficiency:
- Disabled Android Debug Logger / logcat
- Disabled Samsung debug
- Disabled various kernel debugging, statistics and tracing options
Known issues:
- Proprietary ExFAT modules are not included (currently no plans to)
(You don't need ExFAT unless you use a 64GB MicroSD. Even then you can still format it as FAT32.)
>>> CLICK HERE for the CHANGELOG.
Instructions on how to enable logcat and disable auto-root are in the 3rd post (below).
>>> CLICK HERE for the DOWNLOAD links.

Reserved for future use.

Here is how to change some of the kernel configurations:
[HOW TO ENABLE LOGCAT]
If you are a developer or want to re-enable logcat for whatever reason, do this:
adb shell
su
mount -o remount,rw /system
echo ANDROIDLOGGER >> /system/etc/tweaks.conf
mount -o remount,ro /system
[HOW TO DISABLE AUTO-ROOT]
Create a file called ".noautoroot" in either /system or /data. This will disable the auto root installation. This example, shows how to remove root completely:
adb root
adb shell
mount -o remount,rw /system
rm /system/xbin/su
rm /system/app/Superuser.apk
rm /data/app/Superuser.apk
touch /system/.noautoroot
mount -o remount,ro /system
sync
reboot
[HOW TO RE-ENABLE AUTO-ROOT]
adb root
adb shell
mount -o remount,rw /system
rm /system/.noautoroot
mount -o remount,ro /system
sync
reboot

Nice

Nice, to see you here loved your work with the s1

Low benchmark's
Good battery life.

Another great Dev... Welcome Hardcore...

will try and feed back soon...

Nice to see this...

ExFAT
hardcore said:
Known issues:
- Proprietary ExFAT modules are not included (currently no plans to)
Click to expand...
Click to collapse
why no support..?

- MDNIE screen sharpness tuning (improves text readability)
Click to expand...
Click to collapse
does this reduce the contrast of text on light background?
the sharpness is driving me crazy

omg your alive.. loved your work on S1 back in the day. Good to see you working on S3 now

exfat
no support for exfat? why?

dule2303 said:
no support for exfat? why?
Click to expand...
Click to collapse
The exfat modules are closed source proprietary modules. To get them to load, I would have to change some kernel options that could impact performance and stability. So no exfat.
Sent from my GT-I9300 using xda app-developers app

welcome
i have been using your kernels from s1 ,s2 and now on s3.
best performance great battery life. simple:victory:

finally, now i can start to develop my rom :silly:

My GAWD!
Its Hardcore!
Been a LONG time bro!
I remember being on your kernel on FROYO back on the S1!
Glad to see you got the dev'ing spirit for the S3!
This should be speedy

Is it me or is there no cwm flash able version

fidorulz said:
Is it me or is there no cwm flash able version
Click to expand...
Click to collapse
Flashed via ODIN.
In PDA - don't touch anything else.
ie. Like CF root.
EDIT:
Flashed

bradputt said:
does this reduce the contrast of text on light background?
the sharpness is driving me crazy
Click to expand...
Click to collapse
Yup. No more ugly sharpening halos and other artifacts. Finally see what a hd amoled screen should look like.
Sent from my GT-I9300 using xda app-developers app

Related

[SCRIPT][ZIP] Easy Remount Script

Title pretty much says it all. This is just a simple script that allows you to remount /system to RW or RO easily from a shell.
Usage:
Remount R/W:
Code:
remount rw
Remount R/O:
Code:
remount ro
Simple, right?
Just flash via Clockwork, or if you're not rocking CWM yet (read: you should be.) just open the zip and pull the "remount" script out and place it in /system/bin via ADB.
-----------------------------------------
On a side note, let me introduce myself. I just bought my NC, and I hope to get into the dev scene here in a big way. I'm an Android app dev with a couple apps on the Market (dev name - Jesse C.), and the dev of the popular MixUp kernel for the Samsung Epic. I need to get accustomed to the NC still, and eventually get some source downloaded but I will try and impress y'all.
Sounds great.
More devs the better. Welcome
Welcome. Thanks for the script. It seems useful for the times I am in a shell and don't want to switch programs.
This program is similar to yours.
http://www.appbrain.com/app/mount-system-(rw-ro)/com.beansoft.mount_system
This is helpful. And im thrilled that you're going to be developing for the nc.
If you need a tester, Im happy to help.
Sent from my rooted NookColor
You can also download "GScript lite" from the market. You can manually enter the script and save it with the SU box checked. Just give both of them the file name of System_RW and System_RO so that you will know what it is in the future.
For System RW
mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
For System RO
mount -o ro,remount -t ext2 /dev/block/mmcblk0p5 /system
Now every time you open gscript, you just have to click on System_RW or System_RO to do it for you
Geniusdog254 said:
Title pretty much says it all. This is just a simple script that allows you to remount /system to RW or RO easily from a shell.
Usage:
Remount R/W:
Code:
remount rw
Remount R/O:
Code:
remount ro
Simple, right?
Just flash via Clockwork, or if you're not rocking CWM yet (read: you should be.) just open the zip and pull the "remount" script out and place it in /system/bin via ADB.
-----------------------------------------
On a side note, let me introduce myself. I just bought my NC, and I hope to get into the dev scene here in a big way. I'm an Android app dev with a couple apps on the Market (dev name - Jesse C.), and the dev of the popular MixUp kernel for the Samsung Epic. I need to get accustomed to the NC still, and eventually get some source downloaded but I will try and impress y'all.
Click to expand...
Click to collapse
Sweet! and welcome!
Here's the simple hack I'm struggling with for the last five days: find the stanza (maybe for build.prop, maybe separate) where you can boost NC's speaker volume 1.5...2.0 times. That would be a serious feat. BTW, all the Droid X/2 owners will love you, too. Different, newer and working on NC A2.1 Gapps collection would be nice, especially with Maps having Streetview mode (as opposed to what we have now. Better ("standard") soft buttons in the notification bar would be nice addition to a custom ROM.
With a success in above tasks, there's a ton of work in building Android 2.2 (or better 2.3 now) basing on standard TI OMAP builder: http://www.omappedia.org/wiki/Building_Android_Kernel
Sky is the limit for this NC bad boy (that is, before BB Playbook and/or Motorola "Google" Tablet is out)

kernel module for rooted Tablet S ( 2.6.36.3 ) - CIFS, NTFS, TUN, bash 4.2 n MORE

Hi all,
This thread is to share the kernel module for rooted Sony Tablet S. I think it would be much useful to post all the zips in 1st post..
Requirement:
Condi's rooted solution on ur Tablet S. Instructions here
So now we have the below:
2.6.36.3 Kernel Modules :
- CIFS (and u can mount any LAN Network shared drives to your Tablet S and watch movies or listen musics.) Updated version has /proc/fs/cifs/Stats
- NTFS (mount a USB external drive using OTG cable; pretty obvious filesystem by the name )
- TUN (/dev/tun device for OpenVPN usage.)
- USB Serial ( cp210x, ftdi_sio and oti6858 ) --- NEW
Shell binaries :
- bash 4.1 (with bash configuration files. bash binary is changed to auto read from /data/local/bash for bashrc file ) [ Updated to version 4.2 ]
MD5SUM is as below:
5cd998c7d5f3d7b3e86fb1a46abec6e5 Sony_tablet_S-CIFS_module.zip
6e4b692028461d39fe9c2b291f6a9943 bash-4.1.zip
(OLD builds )
2ad1a2335b8cbd1f7d67b8686af67e48 Sony_tablet_S-CIFS_module_new.zip
fd461c462ca55982d60a274eb04565b5 Sony_tablet_S-NTFS-rw_module.zip
84b11ec49d21d62e1c90155f6b264cb0 bash-4.2.zip
d9859110c52e0a0e923f11564edf35b7 bash_cfg.zip
9b4e4e4505bc5916923b940a46b2e38a Sony_tablet_S-TUN_module.zip
3b97d4291cf7c213b5806b7c574a4475 Sony_tablet_S-USB_Serial_modules.zip
The steps are only manual way to insert the kernel module; automation is up to you. To automate this upon boot, i guess u can put it into init.d or somewhere im not sure.
If you need some kernel modules particular to 2.6.36.3 rooted, let me know.
have fun!
----------------------------------------------------------------
Kernel Module deploy instructions:
1) adb push <module_name>.ko /data/local/tmp
2) adb shell
$ su
# mount -o rw,remount -t ext4 /dev/block/mmcblk0p2 /system
# cp /data/local/tmp/<module_name>.ko /system/lib/modules/<module_name>.ko
# insmod /system/lib/modules/<module_name>.ko
To verify:
# lsmod
(You will see the module_name listed. )
-------------------------------------------------------------------------
bash shell deploy instructions:
1) adb push bash /data/local/tmp
2) adb push bash_cfg.zip /data/local/tmp
3) adb shell
$ su
# mkdir /data/local/bash
# chmod 775 /data/local/bash
# chgrp 2000 /data/local/bash
# cd /data/local/bash
# unzip /data/local/tmp/bash_cfg.zip
# chmod 755 /data/local/tmp/bash
# cp /data/local/tmp/bash /system/xbin/bash
Now, u can type bash at your prompt and you will see the below:
[localhost /data/local/tmp/new_bin]#
Overclock module possible?
zerod78 said:
attached is the kernel module cifs.ko for Sony Tablet S.
Click to expand...
Click to collapse
Thank you! Will check kernel modules things..
norberto_ said:
Overclock module possible?
Click to expand...
Click to collapse
The same I thought
I will check it, if everything will gonna work ok,
then it will be added to AiO as one-click solution.
br
condi
norberto_ said:
Overclock module possible?
Click to expand...
Click to collapse
Not in this current kernel as its compiled as built-in. However custom kernels in future should allow OC. Need time to look into.
NTFS Support for external drives?
---------- Post added at 06:00 PM ---------- Previous post was at 05:59 PM ----------
zerod78 said:
Not in this current kernel as its compiled as built-in. However custom kernels in future should allow OC. Need time to look into.
Click to expand...
Click to collapse
damn
I thought it is possible, because ia have seen this kind of modules for other devices.
norberto_ said:
NTFS Support for external drives?
---------- Post added at 06:00 PM ---------- Previous post was at 05:59 PM ----------
damn
I thought it is possible, because ia have seen this kind of modules for other devices.
Click to expand...
Click to collapse
Those are already having bootloader cracked. would need more info from Condi abt that on our tablet and the possibilities.
Btw, heres the NTFS rw kernel module.
<6>[96479.498359] NTFS driver 2.1.29 [Flags: R/W MODULE].
# lsmod
ntfs 194248 0 - Live 0xbf03e000
<refer to 1st post for files and deploy instructions>
zerod78 said:
Those are already having bootloader cracked. would need more info from Condi abt that on our tablet and the possibilities.
Btw, heres the NTFS rw kernel module.
<6>[96479.498359] NTFS driver 2.1.29 [Flags: R/W MODULE].
# lsmod
ntfs 194248 0 - Live 0xbf03e000
MD5SUM :
fd461c462ca55982d60a274eb04565b5 Sony_tablet_S-NTFS-rw_module.zip
Click to expand...
Click to collapse
NTFS module is live for me too but when i connect my NTFS formatted pendrive the tablet tells me blank USB device.
Is there any other commands to mount the ntfs drive?
norberto_ said:
NTFS module is live for me too but when i connect my NTFS formatted pendrive the tablet tells me blank USB device.
Is there any other commands to mount the ntfs drive?
Click to expand...
Click to collapse
Does it appear in the mount cmd output? Mounting it manually with '-t ntfs' would be required i feel...
adb shell
$su
# busybox mount
what does your screen show?
zerod78 said:
Does it appear in the mount cmd output? Mounting it manually with '-t ntfs' would be required i feel...
adb shell
$su
# busybox mount
what does your screen show?
Click to expand...
Click to collapse
Maybe you could achieve automount when inserted by changing vold/svold.fstab?
condi said:
Maybe you could achieve automount when inserted by changing vold/svold.fstab?
Click to expand...
Click to collapse
Yeah i was looking at that earlier and on further search it seems possible with patched vold here
Not 100% sure if its the same software but i guess it should be... I do not have a spare sdcard to format into ntfs and still awaiting for my OTG cable to arrived before i can test that.
new compiled versions available...
bash 4.2
cifs.ko
newly added:
tun.ko
10 chars....
zerod78 said:
new compiled versions available...
bash 4.2
cifs.ko
newly added:
tun.ko
Click to expand...
Click to collapse
Thanks for the Tun module. It worked perfectly!
New kernel modules update
Added USB Serial kernel modules :
- cp210x
- ftdi_sio
- oti6858
Requested by feith
Unfortunately, the modules don't work with the ICS kernel - 2.6.39.4
Code:
# insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
I assume updated versions of the modules are required? I only need TUN and NTFS, but I guess folks will need the other modules, too?
Also, this may be a silly question, but... would it be possible to also install more I/O schedulers in this way?
I need USB-Serial for rooted ICS Kernel 2.6.39.4
I hope someone can bring them to our Tablet. Thank you!
Are there no updated modules for ICS-Kernel? @all developers: it would be very helpful if you could release these updated ones
djlars said:
Are there no updated modules for ICS-Kernel? @all developers: it would be very helpful if you could release these updated ones
Click to expand...
Click to collapse
I would like to see that also.
I can't connect my ntfs hard drive. Only fat32 partition is recognized
Sent from my Sony Tablet S using xda app-developers app
Can anyone tell me how to get these kernel modules? I need them to get 3G Modem working..
djlars said:
Can anyone tell me how to get these kernel modules? I need them to get 3G Modem working..
Click to expand...
Click to collapse
Hey there,
I've compiled and posted kernel modules for kernel version 2.6.39.4
http://forum.xda-developers.com/showthread.php?t=1870077
Let me know if there are others that people could make use of.
A

/!\ OLD THREAD 16-10-2013 /!\ -- CYANOBIZ - ICS for GEN8 based on CM9 - BETA2.6

The system is stable now on my tab, don't forget, you have only 256MB of RAM, i cannot make the impossible Lots of tweaks are include into the kernel and the ROM to have a fast tab...!
If you have any problem, go there:
Sources:
Github: https://github.com/bizcuite
Kernel sources is available here: https://github.com/bizcuite/Archos_OPENAOS_Kernel_ICS
Frameworks base folder: https://github.com/bizcuite/android_frameworks_base
Device Folder: https://github.com/bizcuite/Device_ICS-for-ARCHOS-GEN8
--------------------------------------------------------------------------------------------------------------------
/!\
DON'T TRY THE KERNELWITH OTHERS OS for GEN8
IT IS NOT COMPATIBLE WITH OTHERS SYSTEMS
/!\
--------------------------------------------------------------------------------------------------------------------
Works:
3D - libs comes from Galaxy SL - and Kernel drivers from RowBoat
Sensors - Rotation
Sound
Youtube (HD is not smooth- 15/20FPS)
Touchscreen in multipoint (thanks to Divx118 and Letama for their help on my thread)
Wifi
Sdcard & MMC - USB SHARE
12/03/2013
H264/H263 - MP3/AAC played with hard decoders
OMX interface comes from CM10.1
UI optimised (thanks defy dev)
Sound HAL from opensource
Camera but you cannot take any picture or video with this camera ATM
Version 1.6 (17/03/2013):
- Dspmanager has been removed (bug)
- MusicPlayer from google AOSP include.
- Phone.apk removed too
CYANOBIZ - BETA 2.0/2.3 - 10/04/2013
- GPU Libs update
- OPENGL renderer activated
- WallPaper works
- WebGL works well (Chrome can works now)
- Network statistics works
- Sound noises are less frequents than v1.7 and V1.8
CYANOBIZ - BETA 2.1 - 18/04/2013
- Youtube works (i had heard that it doesn't worked in beta 2.0)
CYANOBIZ - BETA 2.4 - 11/05/2013
-Libs from Samsung Galaxy Ace works very well (better) than rowboat libs.
-A43 must have a working TS
-Zram configured directly to have 250MB of ZRam (better perf than compcache)
CYANOBIZ - BETA 2.5/2.6 - 19/05/2013
-TLS register activated
-Swap of 175MB added in the image file
-Zram can be activated (re-added) - i have a way to activated zram1 as ext4 partition...
KERNEL:
- OC kernel by interface (see in /sys/power/)
- dsp to 800MHz when 5th step is activated
- GPU drivers Updated (backported)
- CPU Alignment (backported)
- JHash update
- Network stat driver added (backported)
- Lots of modules directly include into the kernel
- Cleancache include (backported) and activated http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/vm/cleancache.txt?id=4fe4746ab694690af9f2ccb80184f5c575917c7f
- Genlock Backported from 2.6.35
- New Zram
- New driver wifi functions (configurate in ".config" files) i find wifi better
- TLS register hacked
- Zram
- Snappy compression from google
- Compcache 25% or 35% of RAM
Doesn't work:
-Bluetooth can works with a command enter in a terminal hciconfig hci0 up.
-Camera (you can preview only)
-Battery stats (% works, but no notification of charge)
-Bugs - report please
-------------------------------------------------------------FILES TO DOWNLOAD-------------------------------------------------------------
SINCE V2.4 AND DON'T USE ANY SWAP SOFTWARE WITH THIS VERSION
---------- V2.6 with another start order for Swap: /swapfile (175MB) uses in first, zram in second and compcache in last. = 175+50MB+25%/35% of your RAM
A101 - v2.6 = http://www.mediafire.com/download.php?444vbceqerzboqb
A70 - A70S2 (change the dpi to 160 in build.prop for A70S2 only) - v2.6 = http://www.mediafire.com/download.php?1urte0y2f5dnzwu
A43 - TS not fix in landscape ATM - v2.6 = http://www.mediafire.com/download.php?206d2tqybl1260w
GAPP: http://www.mediafire.com/download.php?blsz6ie172i1qzo
For kernel initramfs and data image see attachment files
25% of RAM is "compcached" with zram snappy compression
35% of RAM is "compcached" with zram snappy compression
25% of RAM is "compcached" with zram LZO compression
-------------------------------------------------------------SYSTEM INSTALLATION-------------------------------------------------------------
How install CM9 on archos gen8
-Download CM9 image files from mediafire that i have shared, choose appropriate image.
-Download initramfs.cpio.gz (NOT MINICOM except i tell you to install it for a report)
-Download Kernel in attachment files (don't uncompress the Kernel file, just rename it like this: zImage)
-Download data.img.tar.gz and uncompress it - choose the data image that you want and renamed it like data_ICS.img
Install Kernel and initramfs.cpio.gz
-install kernel and initramfs.cpio.gz (don't install the minicom version) by SDE menu
-Don't uncompress the Kernel file, just rename it like this: zImage
-Just copy-paste, ONE BY ONE the kernel and initramfs.cpio.gz (if I paste together the files, it doesn't worked for me)
/!\ BUT BIZCUITE, I HAVE A PROBLEM, THE TAB SAYS ME THAT zImage IS NOT INSTALLED, AAAAAAAAH!!!!!PLEAAAASE HEEELP
=>You have WINDOWS please read this!!!
Install CM9 Image:
-uncompress image of CM9 downloaded
-copy paste image on the root of internal sdcard (like CM7)
-uncompressed data.img.tar.gz if it's not done, choose an image and rename it like data_ICS.img
-copy/paste the data_ICS.img to the root of the internal sdcard.
How configure menu.lst (See the file in attachment, just uncompress it)
-edit your menu.lst, copy paste my line
Code:
CYANOBIZ||/CYANOBIZ_BETA2.X_AX.img|/init|0Archos|ARCHOS|ARCHOS|/init
Change "CYANOBIZ_BETA2.X_AX.img" by the version and the type of tab that you have downloaded
Exemple: CYANOBIZ_BETA2.4_A101.img
If you haven't the file. Create a file named "menu.lst" with notepad++ under windows (not the windows notepad!!!) Or gedit for ubuntu.
And copy paste the line on it. Save and copy paste the file on the root of the internal sdcard.
-------------------------------------------------------------GOOGLE APP. INSTALLATION-------------------------------------------------------------
How install Google App.
If you have NEVER installed GApp:
-Download the file
-Rename the file like this "gapps-ics-20120429-signedremake_all_dpi_works.zip" ( just WITHOUT the "-" )
-Copy paste the file in the download folders of your internal SDCARD
-Reboot
-After the first reboot wait 5 minutes (the system uncompresses the files and install its)
-Reboot and enjoy
-------------------------------------------------------------BLUETOOTH ACTIVATION-------------------------------------------------------------
If you want to have Bluetooth
In a terminal enter:
Code:
hciconfig hci0 up
-------------------------------------------------------------SWAP CONFIGURATION-------------------------------------------------------------
SWAP / Zram / CompCache:
The swap is used with this priority:
Code:
[email protected]:/ # cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 179156 5716 -1
/dev/block/zram0 partition 51192 0 -2
/dev/block/ramzswap0 partition 175464 0 -3
This the new swap_activation.sh
Code:
swapoff /dev/block/ramzswap0
swapoff /dev/block/zram0
echo $((50*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /swapfile
swapon /dev/block/zram0
swapon /dev/block/ramzswap0
Just change the order of this lines to start differently the swap.
First to start : swapon /swapfile
second to start: swapon /dev/block/zram0
last to start: swapon /dev/block/ramzswap0
Play with this lines to see if performance are better.
-------------------------------------------------------------OVERCLOCK-------------------------------------------------------------
HOW OVERCLOCK THE CPU
just change the value with a root explorer into the file at this path:
/sys/power/mpu_freq_opp5
YOU WILL LOSE THE CHANGE AFTER A REBOOT
but if you find your oc stable write the line in the init.rc, under " # Enabling power management features":
Code:
write /sys/power/mpu_freq_opp5 1100
-------------------------------------------------------------SOFT TO USE-------------------------------------------------------------
Which software i used to have a better tab or functions:
Performance:
Seeder (more smooth): http://forum.xda-developers.com/showthread.php?t=1987032
Tools:
Archos Video player: To have access to SMB server and watch directly video. (deactivate hardware decoding)
ZRAM Status:to keep an eye on my Zram Swap (lots of information)
LogCat:
Logcat Extreme: to share me a logcat when you have a crash or others problems
--------------------------------------------------------------------------------------------------------------------
FAQ:
I HAVE TRIED GMAIL, IT DOESN'T WORKED WITH MY TAB
HOX FIX IT: Biz, gmail works by installing maps, then open gmail it will force close, then go to accounts and sync gmail reboot tablet and works ==> Thanks Porobu
How have a good Camera image :
-> just open camera app, unplug usb cable and press power button to activate deep sleep mode (wait the led turn off) and presss again power button. Re open the camera app and the image is clean.
--------------------------------------------------------------------------------------------------------------------
If you have any problem with kernel or OS, download again all files and reinstall its.
If you have bootloop or crash of tablet, make me a report plz.
--------------------------------------------------------------------------------------------------------------------
/!\ To make a report /!\ MINICOM version of initramfs is required.
YOU DON'T USED ADB (select NONE option) .. JUST MINICOM (SERIAL option)
I used the initramfs.cpio.gz with debug by serial made by Divx118.
install minicom and enter in a terminal under root rights:
"minicom -D /dev/ttyACM2" (when you are after selection of debug types screen and when OS screen selection appears press "enter" don't forget to plug usb cable )
The minicom must be connected. and DMESG log appears on terminal.
CONFIGURE YOUR TERMINAL TO HAVE UNLIMITED CHARACTERS ON THE SCREEN (else log will be cut)
See the tutorial about debug on Openaos website
Have Fun!!
Bizcuite
Thanks to:
-Letama
-Divx118
-Powerplop for his help on sound pb
-All who have helped me indirectly or directly
-My beer shop :angel:
-Many thanks to Wilsey and Guanfy to have helped me to debug screen and TS without them, your tabs couldn't worked correctly.
-Bingoig for his help to fix menubutton for A101
-Mavasilisk for his great help and his topic about my ROM in general section
-Mikerla
-Porobu
-All donators (4 times)]
18/10/2012
UPDATE: init.rc FOR A101 ONLY FIX SCREEN ORIENTATION
How push it:
With adb, you must have installed adb initramfs.cpio.gz (see first page)
run adb with adb shell after have configure it to see if the configuration is good:
"adb shell"
"exit"
"adb root"
"adb push / /"
---------------------------------------------------------------------------------------------------------------
19/10/2012
UPDATE KERNEL TO SEE IF TouchScreen OF A70S WORKS works with all Tabs!!
---------------------------------------------------------------------------------------------------------------
22/10 i have include in rom, binaries for TS from archos firmware. And update init.rc. see first post to download the new update.
---------------------------------------------------------------------------------------------------------------
26/10 I have made a modification in code to have TS working for all tabs, i need log and report to see if it works correctly
See V0.4 to have update.
Modification in the code are situate in inputreader.cpp in framework/base/service/:
Code:
if (mParameters.orientationAware
|| mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
|| mParameters.deviceType == Parameters::DEVICE_TYPE_POINTER) {
mParameters.associatedDisplayIsExternal = false;
mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
&& getDevice()->isExternal();
mParameters.associatedDisplayId = 0;
---------------------------------------------------------------------------------------------------------------
29/10 -- CM9 - V0.5
-Kernel revert back (for A101, bad name of TS, it was a test that i had forgotten to remove)
-data_ICS.img to install to root of SDCARD (like CM7)
-Bootloop fix
-NO BOOTANIMATION (black screen, please wait that the first boot finished it)
-BUG WITH CPU GOV ALWAYS AT PERFORMANCE (see first post to fix it)
----------------------------------------------------------------------------------------------------------------
30/10 -- CM9 - V0.6
-soft button fix (ty guanfy and Wisley)
----------------------------------------------------------------------------------------------------------------
31/10 -- CM9 - V1.0
-All about screen works well for all tabs (A70S2 - A101S - A70S-H confirmed)
-CM9 Sources in "cooking" for share
---------------------------------------------------------------------------------------------------------------
22/12:
FIx USB SHARE for SDRAM Version.
New version ALPHA 1.1 in progress
Had to need to update my Ubuntu to 12 to download update of ICS from Cyanogen (Git-Core error, impossible to update git-core with 10.04)
Kernel modify for more stability (Cpu Gov conf - 5th freq. step deleted)
I will make another kernel to include driver for A43 tabs TouchScreen.
But i need logcat by A43 tabs users.[/B]
VolumeManager.cpp has been changed to have USB SHARE working.
---------------------------------------------------------------------------------------------------------------
Problem with stability is fix. with Kernel V1.4
DON'T TRY TO COMPILE ATM, IT'S JUST A BETA VERSION OF THE HOW - I HAVEN'T TEST IT!!
How to compile CyanoBiz:
Make sure that you have Ubuntu 10.04 or 12 - 64Bits - 4GB of RAM - 100GB free on HD and a Quad core CPU is better to compile it (i have 4GB of RAM and a little Core2duo 1.6GHz - dual core on a T60P Lenovo - HD of 300GB).
Go to your work foder. i have put it directly in my home directory, done it as you want.
mkdir -p ./BIZ_ICS
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://github.com/CyanogenMod/android.git -b ics-release
repo sync -j16
Wait that the download is finished....
Download my github and uncompress the framework, device and hardware zip files (not update ATM).
Replace CM9 folders by mine:
-./framework/base
-./hardware/...
-./device/archos/g8
To compile:
. build/envsetup.sh
lunch
choosecombo
-> option userdebug let the others default value
Make -j4
To make the image file after compilation
Code:
rm CYANOBIZ*.img
umount /mnt
echo A70S:
qemu-img create -f raw ./CYANOBIZ_BETA2.x_A70.img 300M
mkfs.ext4 -qF -O ^huge_file ./CYANOBIZ_BETA2.x_A70.img
mount -o loop ./CYANOBIZ_BETA2.x_A70.img /mnt/
rsync -rlpgotvDH --progress --delete ./root/ /mnt/
rsync -rlpgotvDH --progress --delete ./system/ /mnt/system/
mkdir -p /mnt/data/test /mnt/mnt /mnt/mnt/storage
ln -sf /mnt/storage /mnt/storage
chmod 0777 /mnt/mnt/storage /mnt/data/test
chown -R root:root /mnt/
chmod 0755 /mnt/system/framework/*
chmod 6755 /mnt/system/xbin/su
chmod -R 0755 /mnt/system/media/*
chmod -R 0755 /mnt/system/usr/share/alsa/*
chmod -R 0755 /mnt/system/lib/dsp/*
chmod -R 0644 /mnt/system/lib/libOMX.*
chmod -R 0755 /mnt/lib/*
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
mkdir /mnt/system/media
cp -R ../../../../device/archos/g8/media/* /mnt/system/media/
mkdir /mnt/system/usr/share/alsa
cp -R ../../../../device/archos/g8/system/usr/share/alsa/* /mnt/system/usr/share/alsa/
cp -R ../../../../device/archos/g8/init.rc /mnt/init.rc
mkdir /mnt/system/lib/dsp
cp -R ../../../../device/archos/g8/system/lib/* /mnt/system/lib/
mkdir /mnt/lib
cp -R ../../../../device/archos/g8/lib/* /mnt/lib/
rm /mnt/system/app/Phone.apk
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
chmod -R 0755 /mnt/system/lib/*
sync
umount /mnt
echo A101:
qemu-img create -f raw ./CYANOBIZ_BETA2.x_A101.img 300M
mkfs.ext4 -qF -O ^huge_file ./CYANOBIZ_BETA2.x_A101.img
mount -o loop ./CYANOBIZ_BETA2.x_A101.img /mnt/
rsync -rlpgotvDH --progress --delete ./root/ /mnt/
rsync -rlpgotvDH --progress --delete ./system/ /mnt/system/
mkdir -p /mnt/data/test /mnt/mnt /mnt/mnt/storage
ln -sf /mnt/storage /mnt/storage
chmod 0777 /mnt/mnt/storage /mnt/data/test
chown -R root:root /mnt/
chmod 0755 /mnt/system/framework/*
chmod 6755 /mnt/system/xbin/su
chmod -R 0755 /mnt/system/media/*
chmod -R 0755 /mnt/system/usr/share/alsa/*
chmod -R 0755 /mnt/system/lib/dsp/*
chmod -R 0644 /mnt/system/lib/libOMX.*
chmod -R 0755 /mnt/lib/*
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
mkdir /mnt/system/media
cp -R ../../../../device/archos/g8/media/* /mnt/system/media/
mkdir /mnt/system/usr/share/alsa
cp -R ../../../../device/archos/g8/system/usr/share/alsa/* /mnt/system/usr/share/alsa/
cp -R ../../../../device/archos/g8/init.rc /mnt/init.rc
mkdir /mnt/system/lib/dsp
cp -R ../../../../device/archos/g8/system/lib/* /mnt/system/lib/
mkdir /mnt/lib
cp -R ../../../../device/archos/g8/lib/* /mnt/lib/
rm /mnt/system/app/Phone.apk
chmod -R 0777 /mnt/system/app/*
chmod -R 0755 /mnt/system/bin/*
chmod -R 0755 /mnt/system/lib/*
sync
umount /mnt
Hello,
ICS doesn't work on my A43. It stay locked on the OpenAOS screen after the .img selection menu.
Maybe my tablet isn't compatible.
Thanks for your great work
Sent from my A43 using xda premium
GoL LuM said:
Hello,
ICS doesn't work on my A43. It stay locked on the OpenAOS screen after the .img selection menu.
Maybe my tablet isn't compatible.
Thanks for your great work
Sent from my A43 using xda premium
Click to expand...
Click to collapse
Have you any cable connected on the tab and have you seen this?
Others things:
If you want to power on your tab without make any debug, don't forget to disconnect the tab from the USB computer.
If you do that, the CM9 doesn't want boot.
DISCONNECT USB CABLE IF YOU HAVEN'T MINICOM RUNNING
Retry without cable please and with the new kernel!!
Try to see if you have any log on terminal if it doesn't worked
Bizcuite
Please report about Touchscreen it's very important for me (and for you if you want a CM9 who works on your tab )
Make a report like this:
Model of tab: Archos xx
Touchescreen works: yes / no
Another bug (except if it writes on first post)
Remember: the first boot takes time the dexopt is active 2-3 minutes to have unlock screen.
Bizcuite
Bizcuite
Biz,
I've flashed the new kernel, booted back into CM. I've been sitting at the bootsplash for 20 minutes now. Attachment below.
Is it safe to try it on A70S with "kboot" installed? Seconds question that I'd like to know is that the touchscreen isnt currently working, right?
Mavasilisk said:
Is it safe to try it on A70S with "kboot" installed? Seconds question that I'd like to know is that the touchscreen isnt currently working, right?
Click to expand...
Click to collapse
I don't know if it works with kboot, the kernel is based on CM7 kernel, if it works with it i think that yes!!
Touchscreen for A70S doesn't work (except if it uses Hanvon TS, it must work now), yes and i need a full log to fix it if i can (without tab it's very difficult).
Biz,
I've flashed the new kernel, booted back into CM. I've been sitting at the bootsplash for 20 minutes now. Attachment below.
Click to expand...
Click to collapse
You have a harddrive version, that's the pb, there is no error who permit me to fix it ATM.
I will pm you and see it later.
Edit: i have seen that all your log is cut, can you remake it with a more larger terminal (or more little char.) to have all lines
Bizcuite
the last thing that I see when I boot is some cyano guy who is traveling in space. Do I have to wait longer or its the unlock screen and my touchscreen isnt working?
EDIT: Rename your data.img to something else.
EDIT2: Can u help me run adb successfully, I've tried many times with guides but it was not for gen8 and I couldnt make it run. I really wanna join.
EDIT3: It booted. The touchscreen on A70S is working only at the upper left side (I can pull down the statusbar and enable/disable wifi). Nothing else is working on touchscreen. Hope it helps you cuz I cant run adb.
Bootloop
Mavasilisk said:
the last thing that I see when I boot is some cyano guy who is traveling in space. Do I have to wait longer or its the unlock screen and my touchscreen isnt working?
EDIT: Rename your data.img to something else.
EDIT: Can u help me run adb successfully, I've tried many times with guides but it was not for gen8 and I couldnt make it run. I really wanna join.
Click to expand...
Click to collapse
/!\ To make a report /!\
YOU DON'T USED ADB.. JUST MINICOM (adb cannot worked with this initramfs.cpio.gz, don't change it if you want adb, i have another version without serial debug)
I don't think that rename data.img is usefull:
look the init.rc:
Code:
mount ext4 /dev/block/mmcblk1p1 /mnt/storage
mount vfat /dev/block/mmcblk1p1 /mnt/storage
mount ext3 /dev/block/mmcblk0p2 /mnt/system
# mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
# mount ext4 [email protected]/mnt/storage/data.img /data nosuid nodev
data.img is not mount i used only data folder IN the image.
I need a log to see what's appened, i will retry my rom upload when i will be at home
If you have any linux machine you can try to see if there are crash errors when you mount the image in the data folder and tombstones folder
To mount image file enter:
mount -o loop /media/A70S/openaos-cm.img /mnt/
look the path of your tab, maybe it's not the same.
Bizcuite
arkade91 said:
Bootloop
Click to expand...
Click to collapse
More usefull with a log please.
Thanks
Bizcuite
I dont have a linux machine. Is there any tutorial "how to set up minicom" or what is it?
bootlooping for about 10 mins on a101it using kboot, is it related to kboot i wonder, anyway il see if i can pull logs later, right now i got to go somewhere?
bizcuite said:
I don't know if it works with kboot, the kernel is based on CM7 kernel, if it works with it i think that yes!!
Touchscreen for A70S doesn't work (except if it uses Hanvon TS, it must work now), yes and i need a full log to fix it if i can (without tab it's very difficult).
You have a harddrive version, that's the pb, there is no error who permit me to fix it ATM.
I will pm you and see it later.
Edit: i have seen that all your log is cut, can you remake it with a more larger terminal (or more little char.) to have all lines
Bizcuite
Click to expand...
Click to collapse
I can expand the terminal window, but I already changed the profile for unlimited scrolling. The entire log as it was recorded should be there. I can produce another one with a maximized terminal window if that will help. Log attached.
---------- Post added at 09:59 PM ---------- Previous post was at 09:54 PM ----------
Mavasilisk said:
I dont have a linux machine. Is there any tutorial "how to set up minicom" or what is it?
Click to expand...
Click to collapse
Your best bet if you want to get serious on testing and debug is to install a linux distro. Since android was born from linux, it's much easier to get the work done from a linux platform. Your best best would be to used an Ubuntu based distro, like Ubuntu or it's variants, or Linux Mint. If you use that, I can give you instructions on what you need to get rolling. PM me if you are interested in doing that.
Yes I am interested in installing Linux. Anyway I found something. On A70S the TS seems to be miss calibrated, I entered settings and enabled the cursor (something that displays my touch direction) and it seems like its miss calibrated for a bigger screed or bigger resolution. Hope it helps.
Mavasilisk said:
Yes I am interested in installing Linux. Anyway I found something. On A70S the TS seems to be miss calibrated, I entered settings and enabled the cursor (something that displays my touch direction) and it seems like its miss calibrated for a bigger screed or bigger resolution. Hope it helps.
Click to expand...
Click to collapse
PM sent. Let me know if you have further questions.
Ok i go home and i will try another thing this evening (launcher pb??)
Wait and see.
I put my log how i like it
Bizcuite
Ranomez said:
bootlooping for about 10 mins on a101it using kboot, is it related to kboot i wonder, anyway il see if i can pull logs later, right now i got to go somewhere?
Click to expand...
Click to collapse
It is not related to kboot I think, i have A70S with kboot and the only difference between them both is the large screen that 101 has.

[Kernel, init.d] flawed init.d support stemming from doomlord kernels

It seems that all Xperia Kernels that stem back to the DoomLord kernel start the init.d execution twice. While you may think "better twice than never" the nearly parallel execution of scripts can create problems if they concurrently manipulate CPU related tables - or fail to do so due to security mechanisms built in. I was hunting the problem that cpu-clock manipulation from init.d did not work for the scripts generated by System Tuner - finally resulting in this finding.
I checked for sirkay 587c and 587d and for fly-kernel 0.8 as the latest of their breed, quite sure nobody has ever cared about this quirk.
The duplicate execution could be tracked back to the init.rc entries:
Code:
[COLOR=SeaGreen]#DooMLoRD: init.d scripts support
start sysinitsupport
class_start core
class_start main
#DooMLoRD: new init.d scripts support
service sysinitsupport /sbin/sysinitsupport.sh
class main
disabled
oneshot[/COLOR]
Which does:
Code:
#!/sbin/sh
# DooMLoRD: init.d support script (v1)
# [START] setting up
echo "[START] remounting system" > /data/local/tmp/sysinitsupportlog.txt
/sbin/busybox mount -o remount,rw /system >> /data/local/tmp/sysinitsupportlog.txt
# make init.d directory
echo "
[*] make init.d directory" >> /data/local/tmp/sysinitsupportlog.txt
/sbin/busybox mkdir -p /system/etc/init.d >> /data/local/tmp/sysinitsupportlog.txt
# correcting permissions of files in init.d directory
echo "
[*] correcting permissions of files in init.d directory" >> /data/local/tmp/sysinitsupportlog.txt
/sbin/busybox chmod 777 /system/etc/init.d/*
# [COLOR=DarkOrchid]make [/COLOR]init.d directory
echo "
[*] [COLOR=DarkOrchid]make [/COLOR]init.d directory" >> /data/local/tmp/sysinitsupportlog.txt
[COLOR=Red]/system/bin/logwrapper /sbin/busybox run-parts /system/etc/init.d[/COLOR]
# [DONE] all done exiting
echo "[DONE] all done exiting" >> /data/local/tmp/sysinitsupportlog.txt
And later also in init.rc:
Code:
[COLOR=SeaGreen]#DooMLoRD: run my mods
service mymods /sbin/execute_mods.sh
class main
oneshot[/COLOR]
Which then does:
Code:
#!/sbin/sh
# starting
echo "[ START ]" > /data/local/tmp/log_doom-mods.log
echo "" >> /data/local/tmp/log_doom-mods.log
[COLOR=Red]# execute tweaks
/system/bin/logwrapper /sbin/busybox run-parts /etc/init.d[/COLOR]
# execute FPS limit remove
/sbin/mount -t debugfs debugfs /sys/kernel/debug
/sbin/echo '0' > /sys/kernel/debug/msm_fb/0/vsync_enable
/sbin/umount /sys/kernel/debug
echo "FPS limit successfully removed " >> /data/local/tmp/log_doom-mods.log
# DONE
echo "" >> /data/local/tmp/log_doom-mods.log
echo "[ DONE ]" >> /data/local/tmp/log_doom-mods.log
You see that the execution of
Code:
[COLOR=Red]/system/bin/logwrapper /sbin/busybox run-parts /etc/init.d[/COLOR]
is actually done twice - from sysinitsupport.sh first and then again from execute_mods.sh
Also mind that the log-entry in the first is leading in the wrong direction (copy error from above). It should better read "execute init.d directory"
The related logs are found in \data\local\tmp.
You can check yourself with this little script in \etc\init.d:
Code:
#!/system/bin/sh
echo [] > /data/local/tmp/$PPID-exec-done
echo $PPID "init.d executed" >> /data/local/tmp/$PPID-exec-done
date >> /data/local/tmp/$PPID-exec-done
Mind the $PPID which is the parent PID of the executing command (the busybox "run-parts"). Per boot you should just get 1 file <PPID>-exec-done containing the timestamp if you get 2 then you know why...
I have attached the script wrapped in a zip file. Unpack it, copy to \etc\init.d (or if not sym-linked to \system\etc\init.d) and change attributes to "777". Reboot and look what you get in \data\local\tmp.
Once you know, remove the script again and delete the created files in \data\local\tmp.
Mind that the scripts referenced from init.rc are copied over again from the kernel part so any change of the scripts in the \system\sbin folder is useless. The kernel has to fix that, no way out here.
I've been looking into this issue as well with the help of dk_zero_cool (mounts2sd amongst other things) as no matter what I tried I could not get m2sd to run in anything other than Safe Mode because init.d was being run as a service and not being executed in full before the init continued. So far I have edited init.rc to remove the second instance you quote above, and edited the first instance to:
Code:
exec /sbin/sysinitsupport.sh
so it executes rather than running a service. I then edited sysinitsupport.sh to contain just this:
Code:
#!/system/bin/sh
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper busybox run-parts /system/etc/init.d
and also removed the line in execute_mods.sh that relates to init.d, so now theoretically the only thing that should happen in relation to init.d is that the exec command runs sysinitsupport.sh which in turn runs the init.d scripts before anything else in init.rc happens. IN THEORY!!! Because even with all of that done (and I have searched through the whole ramdisk, plus looked at the git for the init binary used in the Lupus ICS kernel I am using to make sure I haven't missed anything) the m2sd init.d script is still running in Safe Mode because it is detecting /system/bin/servicemanager running at the point it tries to execute. So something somewhere is still starting before the execution of init.d. I even tried with the init binary from the latest CM9 build for the Ray to rule out something wrong in there too.
I have sent all my files to dk_zero_cool to see if he can shed any further light on what else may be wrong. I have checked four different Ray kernels and they all use the same DoomLord methods so I doubt whether there are any Ray kernels that are running init.d correctly. It would be great to find a fix for this. Hope more people chip in!
Thanks for opening the discussion
As I understood, you have made some changes in the kernel assembly (not the code) to circumvent the effects you have outlined. I admit that I have not fully understood YOUR concern - but for my double execution of the "run-parts" the deactivation of the relevant line in either of the 2 scripts should do it, or not?
Is your concern related to the situation that init.d cannot do "everything" at the time it is executing and so it cannot achieve what some scripts intend to?
I am far too little educated in the details of kernel execution privileges so cannot further comment on that
Yeah, pretty much - to avoid possible issues with the m2sd script moving stuff around while something else is trying to make use of it the first thing it does is check if servicemanager is running, and if it is it disables the ability to move things like /data and dalvik-cache to sd-ext. The changes that we made in the scripts SHOULD have changed the init.d implementation from it running as a service whilst the rest of the init process carried on, to being executed as a command allowing any init.d scripts to be executed prior to any other service being started - as I understand it this is how init.d was intended to be used (ie the user scripts in /etc/init.d are run fully before anything else). However as I said, even with these changes and everything else relating to init.d having been removed something is still starting servicemanager, and until the source of that can be isolated scripts like m2sd cannot run fully/safely.
I guess the strategy to check on servicemanager is not right here. This is a process that starts several services and should not depend on anything in the init.d. So if you say that the boot sequence would have init.d completed BEFORE any service is started via servicemanager - THEN this could be a flaw in the kernel.
However is that really true? Is there no option to check if certain "dangerous" (for your move purposes) services are active already instead of checking on the servicemanager? I had found a nice overview on the Linux boot process here and I think that somewhere as part of the various init.x excuted scripts the servicemanager simply MUST be started - init.d is just a part of init - and for sure not the first part of it.
Off Topic:
I wonder where I can get some more insight in the Xperia Kernels and how they are assembled - especially which trace of that is noticeable in the filesystem. I noticed that the ICS Kernel have roughly 340MB for the user space while the JB Kernel has 360MB. Device should have 512 MB RAM, then some MB go away for radio and possibly video buffer, but his should be the same for all (accross ICS/JB). So what kind of memory tweaking makes this 20MB difference? I have not found a good place to discuss this - where could I go to?
tobbbie said:
It seems that all Xperia Kernels that stem back to the DoomLord kernel start the init.d execution twice. While you may think "better twice than never" the nearly parallel execution of scripts can create problems if they concurrently manipulate CPU related tables - or fail to do so due to security mechanisms built in. I was hunting the problem that cpu-clock manipulation from init.d did not work for the scripts generated by System Tuner - finally resulting in this finding.
Click to expand...
Click to collapse
How about Radeon kernel? Is there an issue like you said?
Sent from my ST18i using Tapatalk 2
frogerra said:
How about Radeon kernel? Is there an issue like you said?
Sent from my ST18i using Tapatalk 2
Click to expand...
Click to collapse
Just try out (see the guide on 01test.zip) - nothing you can harm doing that.
kernel behaviour trick
I noticed some kernels (GB and ICS) do overwrite settings from /etc/init.d ....
So if you make an init.d script with specific cpu values, or VM settings...some kernel overwrite these with their compiled/preferred values "after" init.d scripts are executed. This way it looks as if your script is not completely accepted by the rom...but the truth is that the kernel applies its own preferred values afterwards.
Thats why my init.d script contains a wait of 60 seconds in the beginning of the scripts......how ? add:
sleep 60
So your script looks like this (example):
#!/system/bin/sh
# this init.d script is for when you apply doomlord kernel supplied with repack 2013
sleep 60
That will run your init.d goodies after one minute.
As you see I'm working on a revived repack4pda 2013 (GB) , which will be released soon in repack4pda thread.
Br.
Michel
I guess that these kernels may be doing the same what you are proposing - just sleep the shell process before action starts. So you need to lookup the call tree from the init process along the various init.*.rc scripts if this is the case. For duplicate execution of init.d content any timed scripts willl not help - the duplicate execution will just happen later as the same script will pause the same amount of time.
Not sure if the init process script execution is synchronous or not - so if you create scripts which sleep, the final signal for "boot completed" may just also delay and the whole boot process may take longer by that sleep time. As well would you just stack the delays after each other and so nothing is gained finally. Synchronous execution would make it impossible that a part of the init process could postpone beyond boot completed.
It may differ if you run the scripts via the "exec" command or let it execute via the servicemanager. I guess the latter may run them asynchronously - not sure here as well.

BusyBox Issues

I've been a "rooter" for years now. Had 3 HTC Ones, all rooted and one S-Off. Never had an issue like this. I can seem to get BusyBox to install. When I do get it to install it eventually uninstalls itself for some odd reason. Any suggestions?
What I had to do, is flash busybox from TWRP, installing from playstore did not work at all. It has something to do with HTC security.
I just tried that and couldn't seem to find where it's stored.
Sent from my HTC One using XDA Premium 4 mobile app
Added a couple edits, explained at the end of some paragraphs in case someone comes across this, don't like leaving things incorrect if I know it. I strongly recommend enabling xtrace in the shell to check what's actually being executed, you see your functions and aliases expanded too. With all (busybox ash)|mksh|bash|zsh you can do 'set -x' at any time, append it when calling the shell: 'sh -x' or 'sh -o xtrace' with 'sh' being a symlink to any of the mentioned shells; sh runs the shell in posix mode.
Diesel321 said:
I've been a "rooter" for years now. Had 3 HTC Ones, all rooted and one S-Off. Never had an issue like this. I can seem to get BusyBox to install. When I do get it to install it eventually uninstalls itself for some odd reason. Any suggestions?
Click to expand...
Click to collapse
This sounds like SELinux shenanigans. I don't have the HTC One, but I've experienced similar oddities with a SELinux enforced system. (latest TWRP includes SELinux which might be why a twrp doesn't make a difference) With the addition of the SELinux filesystem, a new "file context" permission is attributable to each file/process. The context defines a user, basic function, that it's in the right place, and a sensitivity parameter. There's some good basic info on the SELinux wiki page with commands.
If your system is using enforced SELinux, a program like busybox installed without setting context is going to be denied to exist/run by default, but this depends on how SELinux is configured. I'm guessing it's context is not being set, so it's getting purged on reboot. Another possible SELinux related issue : a custom kernel that doesn't support SELinux is installed on a rom with SELinux --> bad mix, so if that's the case don't be surprised if more issues like this crop up or a data wipe in your sleep randomly occurs out of nowhere --This happened to me twice actually after disregarding this warning-- You can check your SELinux status with
Code:
getenforce
-in adb or terminal emu. This should also be displayed in phone info menu in settings. Make sure it's "permissive" or "enforced". Permissive logs warnings of what SELinux would do if enforced. You can change SELinux to permissive with:
Code:
setenforce 0
This only works if both your kernel and rom are Selinux compatible. Btw you'll probably find all your SELinux command tools in /system/bin symlinked from toolbox. There's also runcon (run with a context), chcon(change context), restorecon (restore original context), and updates have started integrating a flag (usually -Z) to **filter in** SELinux permissions, e.g. toolbox ls -Z. Busybox does not seem to have updated its tools that could support this, at least on Android. *Even Vanirs busybox 1.22.1.awesome doesn't have the ls -Z function. I was shocked to find out "Toolbox!" was actually useful for something, had a mental breakdown over it a couple months ago. [edit: After reading up on some busybox technical stuff, I found that busybox in its rarely seen full version can in fact be compiled with SELinux extended functions. The reason that almost every rom dev out there uses a busybox that doesn't include every function is portability, case rom to rom ;; older to newer vice versa ;& so that problems will be minimized ;; esac.
**(filters not a good way to put it at 2nd glance, sounds confusing. I mean 'test' or read ACLs<extended perms)
So I would check busybox' context after installing it:
Code:
ls -Z "$(which busybox)"
If it's undefined or unconfined, we will change it to this:
Code:
u:object_r:busybox_exec:s0
.. We can fix it ourselves over adb or in a su'd mksh/bash shell, (use supersu since cwm superuser does not pass arguments correctly or at all in most situations):
Code:
su --shell mksh exec -c mksh -x --
First try to restore original context from file_contexts and see if it works:
Code:
restorecon "$(which busybox)"
Then set busybox' context:
Code:
sync && mount -w -o remount -t ext4 /system /system
chcon u:object_r:busybox_exec:s0 "$(which busybox)"
sync && mount -r -o remount -t ext4 /system /system
*** added "-t ext4" to mount command- it should then work with toolbox or busybox no errors
The other thing I might guess besides all this SELinux file context stuff is that the installation of the busybox binary didn't write to disk. If you run fsync off in your kernel, a fast reboot soon after busybox installation could very possibly lead to data loss of recent files. Similarly, but without a huge risk of collateral damage, recent changes to files could be lost if you have writeback journaling enabled for /system and you rebooted within (dirty expire + dirty writeback) / 100 seconds. A normal reboot that spends 5-10 seconds dumping and getting everything written to disk should be fine though. IF the new busybox' "mount" applet/function is incompatible or broken or outdated, a mount failure could occur leading to data loss. Backup toolbox mount in /system/bin should be enough to save this though, so I'm sticking with my diagnosis of a "SELinux gotcha".
Hope this helps, nothing worse than losing busybox or su functionality. As a side note, in case this problem takes a few days to figure out, check out Terminal IDE if you haven't before. It is definitely a nice busybox replacement to say the least if you need backup/better primary tools, at least temporarily. It's probably the most valuable app/terminal/busybox/Java/c/c++/ide/apkbuilder I've ever seen. ZERO ads, no net connection. You can get the latest apk off Google code, and there's a thread on xda by the creator Spartacus Rex. The tools and configurations are much more heavy duty than anything I've seen for Android. It has great well written tutorials to walk anybody through java, c, some shell stuff and utilizing ssh,telnet,iirc,git to make using android more like a linux machine. I've really gotten into this so I thought I would mention it.
7175 said:
... Busybox does not seem to have updated its tools that could support this, at least on Android. *Even Vanirs busybox 1.22.1.awesome doesn't have the ls -Z function. I was shocked to find out "Toolbox!" was actually useful for something, had a mental breakdown over it a couple months ago. [edit: After reading up on some busybox technical stuff, I found that busybox in its rarely seen full version can in fact be compiled with SELinux extended functions. The reason that almost every rom dev out there uses a busybox that doesn't include every function is portability, case rom to rom ;; older to newer vice versa ;& so that problems will be minimized ;; esac.
Click to expand...
Click to collapse
This must be the only sensible post on XDA, that has both Busybox and SELinux in the same post! Thanks.
Any ideas where to get a fully context featured Busybox? Tried to look in those tips you gave, but they're all outdated, i.e Busybox versions lower than 1.22.1.

Categories

Resources