[MOD] Audio gain enhancement for LG devices - General Topics

First of all, but not less important...
I'm not responsible for anything that happens with your phone, also, some people experienced some bricks on certain devices, so, just take care where you put paths and data because your phone maybe vulnerable to bricks!
This audio modding guide is intended for experienced users. Mainly, in the Linux handling area, like customizing the kernel and playing with system internal parameters. Please don't play with this, you could overheat and/or damage your smartphone's motherboard if you mess with this menu options.​
Requirements:
A rooted LG device.
Stock ROM (includes customized or modded stock)
Universal Init.d
BusyBox
And remember, the curiosity killed the cat, don't be a cat.
System requirements:
Any LG device running ICS (or higher) stock ROM.
Procedure:
First part: setting up the environment
1. Open "Play Store", search for "BusyBox Free" (or open the play store link written above).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. Tap the first result and install it, then open.
3. Now, install BusyBox binaries in your device. Just tap "Install".
4. All done. If you see this, close the app.
5. Now, get back to "Play Store" and search for "Universal Init.d" (or open the play store link written above). Tap the first result.
6. Install it.
7. Open it.
8. Here, move the switch from "Off" to "On".
9. Close the app. The environment set up is done.
Second part: testing device's hardware limits
1. Go to the phone's launcher and tap "Phone".
2. Dial 3845#*<your model's numeric part>#. Mine's LG Optimus L9 (Argentina version), it's model number is P778G, in that case, I should dial 3845#*778#.
3. You'll now see the "Hidden Menu" window. There tap "H/W Device Test".
4. Now pick "Sound Test".
5. Tap "Audio CAL Tool".
6. Pick "SetGain".
7. Tap in the list menu next to "Device Type" and pick "headset".
8. Here, you'll see that there's an item called "HS_DL" and next to it a box where you can type a value. This value should be from 0 to 21. This is you headphone output's gain. Mine's default is 13. The maximum for me is 16, it starts crackling if higher. I suggest you to set it to 16.
9. After setting the value, tap "Ok".
10. Exit the menu.
11. Now, to test your new setting, unplug (if plugged) and plug your headphones again.
Third part: sticking your changes
By default, your device will reset everything as it was before with every reboot. What we gotta do to save those changes? We'll save the files you change when you tap "Ok" to another folder and then retrieve it every time the device boots. How? Here you'll see that:
1. Unplug the USB Cable (if plugged), go to Settings > Developer options and enable "USB Debugging".
2. Plug you device to a computer which has ADB (Android Debugging Bridge) installed. (will work on both Windows and Linux) Don't you know if you have it? Type "adb" at the command line, or "sudo adb" (sudo, just in case) in a Linux Terminal. If you see something similar to the next screenshot, you're okay.
3. Open up a command prompt (or Terminal, in Linux). Type:
Code:
adb shell su -c "cp '/data/audio/gain.table.0 /data/local/'"
4. Open a text editor and create a new file. In Linux, use whatever you like to (includes command line and GUI). In Windows, use Notepad++.
4.1 Only if using Windows:
Right click the bar at the bottom saying "Windows (CR LF)" and pick "Convert to UNIX format".
5. Type (or copy-paste) the next code:
Code:
cp -f /data/local/gain.table.0 /data/audio/
chmod 600 /data/audio/gain.table.0
6. Save the file as 02setaudiogain somewhere in your PC.
7. Go to the folder you saved the file in your PC and then, type those commands:
Code:
adb push 02setaudiogain /sdcard/
adb shell su -c 'mount -o remount,rw /system'
adb shell su -c 'cp /sdcard/02setaudiogain /system/etc/init.d/'
adb shell su -c 'chmod 755 /system/etc/init.d/02setaudiogain'
adb shell su -c 'mount -o remount,ro /system'
8. All done, reboot your device to test . Liked the commands part? Reboot it with this command if you don't like the UI anymore:
Code:
adb shell su -c 'reboot'
Fourth part: troubleshooting
Can't install BusyBox or turn on Universal Init.d?
Check for permission denials at SuperSu's (or your root permission management app) logs.
Device not booting anymore?
Restore a backup over recovery or use LG Mobile Support tool (included in LG PCSuite) to re-flash your device.
Fifth part: how it works
As stated by the logs I took from logcat, what you do when you tap "Ok" in the "Audio CAL Tool" is save some fields to a file called gain.table.0 in /data/audio (/data/audio/gain.table.0)
logcat:
Changes it makes:
​
Credits:
To @pauliero 's post for the hidden menu code: http://forum.xda-developers.com/showthread.php?t=2126949

Related

Scripts for Nautilus (Linux file browser)

Hello !
I wrote some scripts for easily pushing and installing files/apks to your android device.
The advantage over "command line" and other scripts like mine :
- Multiple selection allowed (install 100 APKs in one click ! )
- You have a progress bar (shows only the progression between multiples files/ not the state of a single pushing).
- You can choose the destination on your phone with a simple prompt by choosing "Push to ..."
- It's a very simple and lightweight nautilus script...
- You don't have to (in fact, you can't) put the usb in "usb disk" mode, just have debugging enabled.
Examples
To simply install some applications, just select them, right click, go to scripts->ADB->install
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Progression :
Idem for files :
Progress :
Confirmation :
(So the "Push to ..." allow you to choose a destination. "Push to musique" is just a copy of "Push to sdcard" with the second line of the script changed to copy files to /sdcard/music/ instead of /sdcard/ )
How to install
- Download the scripts :
http://www.itstudents.be/~tom/android/ADB Scripts for Nautilus.tar.gz​- Uncompress the files in ~/.gnome2/nautilus_scripts/ADB/
So if your name is mario, you should copy the 3 files to :
/home/mario/.gnome2/nautilus-scripts/ADB/
You are not obliged to make the last folder named ADB, it's just to make "categories" in the Nautilus script menu (like in the screenshots)​
Requirements
- A correctly installed ADB
What is a correctly installed ADB?
- The PATH environment variable has to be set, to be able to just type "adb" and not "/path/to/sdk/platform-tools/adb". If it's not done :
Edit the file ~/.bashrc , you can do that by typing in the console
Code:
gedit ~/.bashrc
and add this line changed for yourself at the end of the file
Code:
export PATH=${PATH}:/path/to/android-sdk-linux_86/platform-tools/
Or, if this does'nt work :
Edit the file /etc/environment , you can do that by typing in the console
Code:
gedit /etc/environment
and add this text changed for yourself at the end of the line "PATH:", before the last ["]
Code:
:/path/to/android-sdk-linux_86/platform-tools/
- The rules for udev have to be made to allow any non-root user to access to the device
Method for any HTC device :
Edit with root rights the file /etc/udev/rules.d/51.android.rules by typing in the console :
Code:
gksudo gedit /etc/udev/rules.d/51.android.rules
and add the lines :
Code:
SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
Hope you'll enjoy !
Please correct my english
don't want people to know what you're listening to, eh?
It's cool; I like it.
very useful
thanks man
I've been wanting to do something like this but never had time to. Will definitely test this out!
Sent from my Nexus One using XDA App
Oh epic win thanks for this!
Sent from my HTC Hero using XDA App
Please reupload ADB Scripts for Nautilus.tar.gz somewhere.
Stupid me...
http://www.kmel.be/~tom/android/ADB Scripts for Nautilus.tar.gz
Please note a little "bug", the progress bar progress when a file start transfer. So if you send just one big file, it will be at 100% for a little time...
Easily correctible, but I haven't the time now...
MappaM said:
Stupid me...
http://www.kmel.be/~tom/android/ADB Scripts for Nautilus.tar.gz
Please note a little "bug", the progress bar progress when a file start transfer. So if you send just one big file, it will be at 100% for a little time...
Easily correctible, but I haven't the time now...
Click to expand...
Click to collapse
nice work. very handy
EDIT: actually I may have spoke too soon, these don't seem to be working for me. Ubuntu 10.10
I know my udev and $PATH are all set up correctly. So I'm not sure where these are failing for me..
any thoughts?
EDIT2: OK it was a $PATH issue the ~.bashrc however is only for interactive non login shells adding the adb path to ~.profile and a re-login solved my problem with this script. Or alternatively you could call adb in the script using it's full path.
Thanks MappaM for the great base script!
Here is my version of "Push to Movies":
My solution to the immediately full progress bar was to use the --pulsate option in zenity this works for me because I am likely to only be sending one file anyway and don't need the fine grain feed back of an incremental progress bar. The one that bounces back and forth is what you will see.
echo "15" ; sleep 1
is a hack, you may not need it but for me it lets the pulsate flag work.
zenity bugs reported here
https://bugs.launchpad.net/zenity/+bug/291850
https://bugzilla.gnome.org/show_bug.cgi?id=567663
Code:
#!/bin/sh
#this is MY path, your path will be different . change this path.
android_path="/sdcard/media/video/movies/"
i=1
(
for thing in "[email protected]"
do
# this first echo tricks the pulsate into working you may not need it. try it both with and without it.
echo "15" ; sleep 1
echo $(($i * 100 / $#))
echo "# Pushing \"${thing}\"" ;
adb push "${thing}" $android_path
i=$(($i+1))
done; i=$(($i-1)) ; echo "# $i files pushed." ) | zenity --progress --pulsate --auto-kill --width=300 --text "Copying files..." --title "Pushing files to $android_path"

[Q] Wolfgang AT-AS43D Root

Hi Guys
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What I'm going to describe is the way how I rooted my phone, in a way I found the least radically and still reversibly, since rooting your mobile could void your warranty. In the case of the Wolfgang AT-AS43D it is very easy to root, simply replace the "su" command with a new one. The "su" command is a Linux/Unix program, when it's invoked without a argument the current user becomes superuser.
Disclaimer: Rooting your device will void its warranty. In addition, performing the rooting procedure incorrectly may have unexpected consequences. Please follow this guide at your own risk. I will not be liable if your device gets damaged or bricked during the process.
These instructions are writen for Windows and Linux machines, I don't have a Mac but I think the instructions should be similar.
Preparations
Download the Android SDK (choice the appropriate operation system). Windows users can also use this, which is just the tooling you will need.
Install the downloaded Android SDK. Remember where you install the Android SDK, you will need it later on.
On your mobile, go to "Menu->Settings->Applications" and select the option "Unknown sources" (not sure if this is needed).
On your mobile, go to "Menu->Settings->Applications->Development" and select the option "USB Debugging".
Connect your mobile to your PC using the USB cable which came with the phone, do not activate "USB Connect/Turn on USB storage".
Windows users need to download some additional drivers, which can be found here (64 bits) or here (32 bits). Additional instructions can be found here (in dutch), skip de "PDANet tool" installation.
Download the "su" application from here and save it somewhere on your computer (e.g ~/Downloads on Linux or C:\temp on Windows), remember this location.
Check before act
Open a terminal or DOS-Box
On Linux: Ubuntu: <ctrl+alt+t> or read here for other ways
On WIndows (7?):
Click on Start and type CMD in search bar
Now press Ctrl+Shift+Enter
This should bring elevated command prompt with full Administrators rights.
Go to the directory "platform-tools" which is a subdirectory of the directory in which you installed the Android SDK (see Preparations step 2). You can do this using the "cd" command.
For example on Linux: "cd /home/<username>/<android-sdk-install-directory>/platform-tools" (without the quotes)
For example on Windows: "cd \Program Files (x86)\Android\Android-sdk\platform-tools" (without the quotes)
To check if everything is all right type:
On Linux: "./adb devices" (without the quotes)
On Windows: "adb devices" (without the quotes)
The message "List of devices attached" should appear and some questions marks (?) followed by the text "device". If this is not the case then stop and seek some help (google or mail me). On Linux I had on one machine of mine a problem regarding rights when executing the command.
Be save or be ....
To backup the original "su" on the mobile, type at the command prompt:
On Linux: "./adb shell mv system/xbin/su system/xbin/su.original" (without the quotes)
On Windows: "adb shell mv system/xbin/su system/xbin/su.original" (without the quotes)
if you like to pull the original "su" from you mobile and store it on your computer (e.g. a folder named "SU-Original"), type at the command prompt:
On Linux: "./adb pull system/xbin/su SU-Original/su" (without the quotes)
On Windows: "adb pull system/xbin/su SU-Original\su" (without the quotes)
On Linux if the backup directory (SU-Original) does not exists, it will be created, in the directory from which you execute the command. I don't know if this is also the case on Windows.
Replacing the su
To put the downloaded "su" in place type at the command prompt (replace the directory in <> signs with your directory, see Preparations step 7):
On Linux: "./adb adb push <directory-with-su-downloaded>/su system/xbin/su" (without the quotes)
On Windows: "adb push <directory-with-su-downloaded>\su system/xbin/su" (without the quotes)
The "su" need some permissions (e.g. executable), so type:
On Linux: "./adb shell chmod 6755 system/xbin/su" (without the quotes)
On Windows: "adb shell chmod 6755 system/xbin/su" (without the quotes)
You are done at the command prompt, to leave it type:
On Linux and on Windows: "exit" (without the quotes)
Install some apps from Google Play
Install Superuser made by ChainsDD.
This app notifies and asks permission when a app wants root access.
Install BusyBox installer made by Stephen (Stericson)
This app makes it easy to install busybox.
Install BusyBox using the BusyBox installer.
Busybox is a collection of simple, but powerful, Linux utilities, that android doesn't come with by default. It is used by some apps like Titanium backup in order to do special operations
Install Root Checker made by Burrows Apps.
Small and simple app to verify root access is properly configured.
User Root Checker to check whether your mobile is correctly rooted.
Cleaning up (optional)
Uninstall Root Checker since you don't need it any more.
On your mobile, go to "Menu->Settings->Applications" and de-select the option "Unknown sources".
On your mobile, go to "Menu->Settings->Applications->Development" and de-select the option "USB Debugging".
Remove the downloaded "su" from your computer.
Uninstall Android SDK (I suggest you leave it installed).
I tried your method, but on my phone "system/xbin/su" does not exist.
Specs:
Android 4.1.2
Kernel AT-AS43D3
Build: TUNA-S17A_AT_L26NL_205_130416
Any ideas?
Maurice
M-VW said:
I tried your method, but on my phone "system/xbin/su" does not exist.
Specs:
Android 4.1.2
Kernel AT-AS43D3
Build: TUNA-S17A_AT_L26NL_205_130416
Any ideas?
Maurice
Click to expand...
Click to collapse
It is for the AT-AS43D and not for AT-AS43D3
But for the AT AS43D3 you can try this out
http://www.mediafire.com/view/?8mxvy0ey5yfdu59

[ADB]ADB v1.0.31 - Fix For ADB Staying Offline in Android 4.2.2

Seems some of the user unable to get the ADB working on Android 4.2.2 as the command prompt always stated that the device is offline so now I open my first thread after I found out the solution
What is ADB?
ADB, or the Android Debug Bridge, is a development tool included with the Android SDK (Software Developer Kit), which allows for communication from an Android device (such as a phone or tablet) to a personal computer, and vice-versa. This communication can be made over a wifi connection. However more commonly, it is made via a USB cable. adb can also be used by developers for communicating from a computer to a virtual android machine that is also running on the computer.
Click to expand...
Click to collapse
Android 4.2.2 now enforces RSA authentication via ADB and this is only supported in the latest versions of ADB.
In Android 4.2.2 (which corresponds to CyanogenMod 10.1), Google implemented some new security features for using ADB. The new "secure debugging" feature requires that you manually approve your computer for an ADB connection. This approval must be done from within the device, and only after any screen lock has been bypassed.
To access your 4.2.2 or higher device via ADB, you MUST ensure you are using a recently-updated Android SDK. Once the SDK (and therefore ADB) has been updated, you must ADB kill-server and ADB start-server any existing ADB daemon running on your computer. The first time you try to connect via ADB, you should receive a prompt on your device to Allow USB debugging? for this device (along with an RSA fingerprint identifying the computer). You may select the Always allow from this computer check box if you want the device to remember this computer, in which case you will not be prompted again when connecting your device to that specific PC.
Click to expand...
Click to collapse
Information from GitHub
ADB with version of 1.0.31 or later will works for Android 4.2.2
In order to use ADB :
Go to the ADB directory. Example C:\android-sdk-windows\platform-tools
Shift + Right click and then click "Open command window here"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
OR use the command in command prompt
Code:
cd C:\android-sdk-windows\platform-tools
NOTE : You can change the directory based on where you placed the ADB files in your computer by simply changing the command to :
Code:
cd <your directory>
To check for ADB version :
Code:
adb version
There are two ways of upgrading your ADB version
Upgrade through Android SDK Manager
Extract the ZIP file that I attached below to the directory you want (example C:\ drive) and redirect your command prompt to the specific directory using "Shift + Right click" or by using the command in command prompt :
Code:
cd <your directory>
Before upgrading your ADB :
After upgraded ADB :
If your ADB is working correctly, you will see this when you plug in for the first time.
NOTE : Cyanogenmod (based) ROMs require the following setting to export kernel logs via adb: Settings >> Developer Options >> Root access >> select "Apps and ADB"
NOTE : The RSA key for the host computer is stored in directory /data/misc/adb/adb_keys
After you press the OK button, in command prompt :
Code:
adb devices
NOTE : Some user reported that the ADB over network doesn't works if the option "Always allow from this computer" is not checked. So make sure you select the option if you want to use ADB over network
now you will get something like this and you are done...ENJOY
Some useful ADB command
Code:
adb shell
Code:
adb logcat
To get a normal logcat
Code:
adb logcat -v long > logcat.txt
OR
Code:
adb logcat -v time -d > logcat.txt
OR
Code:
adb logcat > logcat.txt
To get a radio logcat
Code:
adb logcat -b radio -v time -d > logcat_radio.txt
To get a kernel log
Code:
adb shell su -c dmesg > dmesg.txt
To get a last_kmsg
Code:
adb shell su -c "cat /proc/last_kmsg" > last_kmsg.txt
Reserved
ADB over network
Thank you for this great tutorial.
I've got ADB saying device is offline with ADB over network even with the latest version of ADB. See my post
In fact, if you try to connect over network for the first time, you won't get the popup.
So, make sure you connect with USB and check "Always allow from this computer" before connecting over network.
And if you are using Ubuntu you can get the latest adb via:
Code:
sudo apt-get install android-tools-adb

[FAQ] VanirAOSP Q&A & discussion Thread

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hey guys,since VanirAOSP is the best ROM ever,i wanted to make a Discussion thread here,because the Development thread has low activity and we shouldn't fill it with spam.
WHAT TO DISCUSS HERE:
-Bugs
-Features
-Development
-Other Things related to Vanir
-The original development thread can be found here
Personally,i think that Vanir is pretty underrated here on Moto G section,and i think that more people could try it and say their thoughts,because i've tried many many ROM's through my history here on XDA,and i've never been so satisfied. The ROM is as it's title says; Clean,Fast and organized. But that's just me and my two cents, Try it yourself and say your thoughts here!
The bug posting tutorial is the post below,and connecting your phone through ADB is two posts below,if you need something else explained don't hesitate to ask!
Repost:::
[SIZE="+2"]How to report bugs, the proper way ![/SIZE]
http://therealmofu.com/wp/?p=644
Credit:: by TheRealMofu
Credits:
Indirect for his guide
FuzzyMeep Two for his Windows Logcat Tool
B][SIZE="+2"]These are the options for reporting a bug:[/SIZE]​[/B]
[SIZE="+1"]Section 1 | Logcat:[/SIZE]
This log should almost always be included just because it provides more info than just saying something doesn’t work. It will essentially tell you which apps are crashing and why and it also gives output of what they’re doing. (Your system is running through apps, the dialer, wireless radio’s, etc are all ran through apps.) so, if something is general, like a system force close, please just include a logcat.
How to get a logcat:
Well, this is REALLY simple, all you need to do is just get adb up and running (google how to do that, I don’t feel like writing a ‘how to use adb’ tutorial for everyone’s phone.) and then type
Code:
adb logcat
then you just right click, select, and paste to
http://pastebin.com/
http://logcat.us/
http://paste.ubuntu.com/
and provide the link in the thread/post.
It’s really that simple!
For Windows users i found an self explaining noob friendly program called Windows Logcat tool 4.0
[SIZE="+1"]Section 2 | Dmesg:[/SIZE]
This is getting into issues such as wifi not working, sleep of death, etc. Basically, things that make us go “OH F***” when we use our devices. Note: You will need adb access for this to work, same as logcat.
What this will do is get us live kernel output so we can know things like “What driver is the kernel loading {or not loading for that matter}” and similar things. This is linux, so kernel output is important if a hardware aspect isn’t working right.
How to get a dmesg:
This is simple as well, no matter what operating system you’re on (mac, windows, linux) just type
Code:
adb shell dmesg > dmesg.txt
and then it will have written the output to a .txt file in your current directory. Either paste the contents to the thread, or attach it to your post.
You can also get the dmesg by using terminal emulator. Instead though, you dont type adb shell, you need to also include it to somewhere you will be able to save it. Like /sdcard so, the command goes
Code:
dmesg > /sdcard/dmesg.txt
Just get it off your sdcard and get the contents to the developer!
[SIZE="+1"]Section 3 | last_kmsg:[/SIZE]
Ok, the last thing is last_kmsg. When android kernels crash, they right to last_kmsg so then you can find out what’s going on. This is usually for issues such as random reboots and other various kernel panic symptoms. A kernel panic happens when the kernel tries to do something it can’t. It doesn’t mean wrong permissions, it could just have errored out on something and died which can cause a few things. Anyway, developers REALLY need this if debugging a kernel because it gives us a viable way to see WHAT it’s trying to do instead of trying to guess what it is trying to do
How to get a last_kmsg:
This is super simple and the same on all phones no matter what, what you need is adb up and running (or terminal emulator) and either in adb shell, or terminal emulator just type
Code:
cat /proc/last_kmsg > /sdcard/last_kmsg.txt
or you can do
Code:
adb shell cat /proc/last_kmsg > kmsg.txt
and that will write it to your current working directory from cmd.
And hhp_211 posted this in his thread,and i copied it from him,i hope he won't mind,so thanks @hhp_211
[SIZE="+2"]
Connecting your device through adb on Windows/Ubuntu:[/SIZE]​
[SIZE="+1"]Windows:[/SIZE]
On your PC you need to be logged in as an administrator for doin this and make sure that you activated “USB Debugging” in Settings/Developer Options on your phone !!!
Connect your phone with the USB cable to the PC and select MTP mode
Open the Windows command prompt, which you also can open through pressing Win + R on your keyboard
Now type:
Code:
cmd
Now change into the folder you installed adb, for example:
cd c:\adb
Now were we are in the correct folder, type:
Code:
adb
Now you see a lot of commands appering, and when done, type:
Code:
adb devices
and your phone (Device-ID) should be listed in there, that’s it
[SIZE="+1"]Ubuntu:[/SIZE]
Make sure that you activated “USB Debugging” in Settings/Developer Options on your phone !!!
Connect your phone with the USB cable to the PC and select MTP mode
In terminal type:
Code:
cd (TOOLS_PATH)/android-tools
Then issue the following:
Code:
./adb devices
That’s it
Again,thanks to @hhp_211
Reserved 3 to be shure.

[Developers] Support and development init.d script

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Welcome to this subject where I'll share the following information to activate the terminal init.d our support, as well as the development of the topic is addressed primarily to the developer community roms in order to implement and improve its development in each of the phones and better autonomy thereof is provided.
Warning: Before continuing please read the documentation that will expose so they can check its development, those who only discuss other issues please abtenerse as this issue is not in order to respond is only to well that development develop properly targeted by this issue.
The tools I used for the development of the init.d support they can find at the end of the subject for downloading and asu same time the use so you can verify some of the things we will discuss on this issue.
no script can be universal because it is different and its code and some values and parameters are only applicable for each smartphone
Requirements: root access and SuperSU
1.- proceed with the most basic thing is to give root access to our terminal this method according in each terminal is indispensable as the first requirement
2.- as a second step this would be related to the installation of busybox in the terminal and ending with the installation of the same proceed with checking the same watching the following path with a file browser /system/xbin, if you have any doubts use the application busybox checker to verify the installation of the same
3.- as a third step needs a file browser and asu time they open the routes to them to enter and to edit text files comfortably
4.- as fourth step is to go to the /system /etc there init.qcom.post_boot.sh locate file name to open it proceed traditionally files editor of exploring and we should be on the part of all the way just to add the following lines
Code:
# support init.d
/system/xbin/busybox run-parts /system/etc/init.d
and finished we proceed to save changes to the file
5.- In this step we will create a folder called init.d name is created only once we proceed with changing the permissions would be: 0755 attached screenshot for more details of the permits, download the file will come a script called 99SuperSUDaemon and moved to the /system/etc/init.d apply the same route that takes the folder permissions ie the file 99SuperSUDaemon 0755 will have permission to run properly without any problem because if you put 0644 permits will not run
6.- proceed with terminal power cycle this is to enable support init.d our terminal as seen was not very complicated because they bring roms have actually proven but have not convecid me a story to execution of script obtaining a negative result this method I show a positive result :good:
-Tools
I bring a tool that enables init.d support only run automatically and ready
the end of the song I'll let the files that I used for this topic
1. As a first step it will be necessary to know what we are going and we want to remember that there is no script and not the same parameters with a value change at each terminal
2.- we will create in the internal memory of the terminal a folder called tools this may be optional but we'll use as an example to notice what we do at every step and can understand a bit about this topic
3.- after the tools created folder create a script so that they will ask is to copy the files that are present on that route in this case I will take as an example the following path: /proc/sys/vm is where some values are saved by heart
Code:
#!/system/bin/sh
# copying files
# script by kaiiori xda-developers
sleep 2
echo "creating internal memory directory"
busybox mkdir /storage/emulated/0/tools/vm
sleep 2
echo "copying files"
sleep 2
cp -r /proc/sys/vm /storage/emulated/0/tools
sleep 2
echo "copying completed"
exit 0;
save file vm.sh
4.- install android terminal in the terminal run the following commands
root permissions
Code:
su
go to the directory of your internal memory in this case this is my directory
Code:
cd /storage/emulated/0/tools
find files in the directory
Code:
ls
run the script through the terminal
Code:
sh vm.sh
in the directory /storage/emulated/0/tools/vm has been created a folder called VM and see if open files that have been copied to the internal memory of the terminal
5.- if you open the file values that have default in this case if you to installed scripts should the value applied to the parameter of the same appear if it is not is because there is a problem with the script in content and has to reahacer to carry just the change you want to apply
checking values applied
1.- after you created the script with the content you need to check to see if the value applied is that we have written script is the file we should show the same value as if it does not show is because the code is not right
2.- I leave a script will help them review the values and see if they were applied correctly
Code:
#!/system/bin/sh
# copying files
# script by kaiiori xda-developers
echo " " >>/storage/emulated/0/tools/info.log
echo "-------------------------------" >>/storage/emulated/0/tools/info.log
cat /proc/sys/vm/swappiness >>/storage/emulated/0/tools/info.log
echo " " >>/storage/emulated/0/tools/info.log
echo "-------------------------------" >>/storage/emulated/0/tools/info.log
root permissions
Code:
su
go to the directory of your internal memory in this case this is my directory
Code:
cd /storage/emulated/0/tools
find files in the directory
Code:
ls
run the script through the terminal
Code:
sh script_log.sh
in the directory you create a log file there appear the value that was applied in this case is 100 by default but as I modify it appears 40 that is the result we must apply
with this information I will end my subject just adding the init.d support users should provide updates and other improvements because honestly the code they use and check it when I get the same default the script I use for this and to apply the changes not be able to release it in no way is the greetings own development
reserv
reserved

Categories

Resources