Dear all,
I thought I'd install an apk onto the 'phone, but I cannot find pm
Does anyone know what I forget?
Regards, F
Code:
/sdcard # /system/bin/pm install fennec-4.0b2.multi.eabi-arm.apk
ash: /system/bin/pm: not found
/sdcard # cat /system/bin/pm
# Script to start "pm" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/pm.jar
exec app_process $base/bin com.android.commands.pm.Pm "[email protected]"
/sdcard # uname -a
Linux localhost 2.6.29 #2 Fri Jul 23 06:25:40 KST 2010 armv7l GNU/Linux
Android 2.1
Solved. Don't use ash shell. Used the standard sh:-
# pm install fennec-4.0b2.multi.eabi-arm.apk
pkg: fennec-4.0b2.multi.eabi-arm.apk
Success
Hey everyone.
I messed up IMEI number of my Galaxy Nexus by deleting some files the files in ./factory folder. would someone kindly to provide me the list of all files located in this folder? Please.
Thank you.
Here you go:
Code:
[email protected]:/factory $ ls -l
ls -l
drwxr-xr-x radio radio 2012-01-17 00:55 bluetooth
-rw------- radio radio 640 2012-01-17 00:55 hdcp.keys
drwxrwxr-x radio radio 1999-12-31 22:01 imei
drwx------ root root 1969-12-31 21:00 lost+found
-rw------- radio radio 2114 2010-12-31 22:01 nv.log
-rwx------ radio radio 2097152 2010-12-31 22:21 nv_data.bin
-rwx------ radio radio 32 2010-12-31 22:21 nv_data.bin.md5
drwxrwx--- system radio 1999-12-31 22:00 wifi
-rw-r--r-- radio radio 144 2012-01-17 00:55 wv.keys
[email protected]:/factory $
Update: We have images, all images obtained for the partitions are uploaded here:
http://jellybean.dccontests.com/optimusg/
Partion 27 is recovery, and bootloader is partition 5.
I see from the AT&T thread that many people are getting their phones this weekend. If someone who gets the phone can send me an image of the bootloader I'd like to start getting a look at it.
If you need directions on how to do this, let me know. Currently I'm trying to figure out what the block devices are on the phone. If anyone knows this let me know, so I can direct someone (dbgeek) to get a dd of it.
Shelnutt2 said:
I see from the AT&T thread that many people are getting their phones this weekend. If someone who gets the phone can send me an image of the bootloader I'd like to start getting a look at it.
Click to expand...
Click to collapse
Bought mine 15 min ago at the AT&T store. How do I take an image?
dbgeek said:
Bought mine 15 min ago at the AT&T store. How do I take an image?
Click to expand...
Click to collapse
Nice.....have to wait...
Thank you for looking at this...hopefully it will be unlocked soon
Sent from my SGH-I897 using xda premium
I can walk you through it, but how much experience do you have with Linux/adb?
Sent from my cm_tenderloin using xda app-developers app
Shelnutt2 said:
I can walk you through it, but how much experience do you have with Linux/adb?
Sent from my cm_tenderloin using xda app-developers app
Click to expand...
Click to collapse
Sorry, but zero sums it up pretty well. I'm capable of navigating via DOS or UNIX commands if that helps in any way.
dbgeek said:
Sorry, but zero sums it up pretty well. I'm capable of navigating via DOS or UNIX commands if that helps in any way.
Click to expand...
Click to collapse
Go ahead and install the android sdk and adb, http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK#Windows . Then root your phone, and install busybox.
Plug your phone into the computer, run adb devices in a command prompt. It should show your phone. Then run
Code:
adb shell
su
ls /dev
df
And post the output of the last two commands. I need to know a bit more about the phone so I can give you detailed steps and that will give me the info I need.
Sorry if anything is confusing, just let me know, I'm at work typing this
Does the ATT E970 have root? Answer my own question...Yes - method seems to work from Korean thread.
Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>adb devices
List of devices attached
LG-E970-604d4e7f device
C:\>adb shell
[email protected]:/ $ su
su
ls /dev
ls /dev
d1|[email protected]:/ $ ls /dev
alarm
android_adb
android_mbim
apr_apps2
ashmem
binder
block
bus
ccid_bulk
ccid_ctrl
console
cpu_dma_latency
cpuctl
device-mapper
diag
dsp_debug
full
fuse
gemini0
genlock
graphics
hsicctl0
hsicctl1
hsicctl2
hsicctl3
hw_random
i2c-0
i2c-3
i2c-4
input
ion
keychord
kgsl-3d0
kmem
kmsg
lge_dm_tty0
log
mdm
media0
media1
media2
mem
msm_aac
msm_aac_in
msm_acdb
msm_amrnb
msm_amrnb_in
msm_amrwb
msm_amrwb_in
msm_camera
msm_dsps
msm_evrc
msm_evrc_in
msm_idle_stats0
msm_idle_stats1
msm_idle_stats2
msm_idle_stats3
msm_mp3
msm_multi_aac
msm_qcelp
msm_qcelp_in
msm_rotator
msm_rtac
msm_sps
msm_vidc_dec
msm_vidc_dec_sec
msm_vidc_enc
msm_vidc_reg
msm_wma
msm_wmapro
mtp_usb
network_latency
network_throughput
nmea
null
pipes
pn544
ppp
psaux
ptmx
pts
qmi0
qmi1
qmi2
qseecom
ramdump_dsps
ramdump_lpass
ramdump_riva
ramdump_smem-dsps
random
rfkill
rmnet_mux_ctrl
rtc0
siI-8334
smd1
smd11
smd2
smd21
smd22
smd27
smd3
smd36
smd4
smd5
smd6
smd7
smd_cxm_qmi
smd_pkt_loopback
smd_sns_adsp
smd_sns_dsps
smdcntl0
smdcntl1
smdcntl2
smdcntl3
smdcntl4
smdcntl5
smdcntl6
smdcntl7
smdcntl8
smem_log
snd
socket
tgt
tpa_amp
tspdrv
tty
tty0
tty1
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty2
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty3
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty4
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty5
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty6
tty60
tty61
tty62
tty63
tty7
tty8
tty9
ttyGS0
ttyUSB0
tun
uinput
urandom
usbf
usb_accessory
usb_autorun
usf1
v4l-subdev0
v4l-subdev1
v4l-subdev2
v4l-subdev3
v4l-subdev4
v4l-subdev5
v4l-subdev6
v4l-subdev7
v4l-subdev8
vcs
vcs1
vcs63
vcsa
vcsa1
vcsa63
video0
video1
video100
video2
video3
video38
video39
wcnss_wlan
xt_qtaguid
zero
[email protected]:/ $ df
dfdf
/system/bin/sh: dfdf: not found
127|[email protected]:/ $ df
df
Filesystem Size Used Free Blksize
/dev 911.16M 64.00K 911.10M 4096
/mnt/asec 911.16M 0.00K 911.16M 4096
/mnt/obb 911.16M 0.00K 911.16M 4096
/system 1.46G 1.06G 411.00M 4096
/data 11.30G 1.64G 9.65G 4096
/persist 7.86M 4.09M 3.77M 4096
/cache 787.39M 13.39M 774.00M 4096
/persist-lg 7.86M 4.11M 3.75M 4096
/mpt 31.48M 4.04M 27.45M 4096
/factory 15.73M 4.04M 11.69M 4096
/sns 7.86M 4.05M 3.81M 4096
/tombstones 251.97M 4.15M 247.82M 4096
/firmware 63.95M 52.84M 11.11M 16384
/mnt/sdcard 11.30G 1.64G 9.65G 4096
/mnt/sdcard/external_sd 14.70G 128.00K 14.70G 32768
[email protected]:/ $
mbonus, thank you for the output, unfortunatly it doesn't show me what the storage memory block devices are. I'm looking for something along the lines of "mmcblk" or others, try the following as root (su) in adb and post the output:
Code:
cat /etc/vold.fstab
The thing here is I just have to figure out which block device/partition holds the bootloader, so you can dump it to the sdcard (or internal storage) and then send it my way. The vold.fstab file should contain what the block devices are. They might be in a subfolder of /dev .
Also when you are roor you should have a '#' instead of a '$' at the beginning of the line in the shell.
ok I'll give it another shot when I get home
Sent from my LG-E970 using xda app-developers app
Thanks for the preliminary work, guys. I really want LTE, so I can't do the new Nexus. The Optimus has mediocre software and the One X+ still apparently has mediocre battery life, so getting this thing opened up to new ROMs might tip me over to the "G".
I thought I had root, but I still get the $ in adb shell
Idk I like the lg rom so far it is very smooth just gonna root and delete some bloatware
Sent from my LG Optimus G
Glad to hear you like the ROM. I'm just going from reviews, so hopefully I'll also like it when I see it in person. I was really hoping the One X+ would be my next phone, but the battery life and heat generation may be a deal breaker.
Edit: Plus, I'm hoping we can open the G up and maybe use some of the development for the Nexus ... except with LTE!
Ilkinansr92 said:
Idk I like the lg rom so far it is very smooth just gonna root and delete some bloatware
Sent from my LG Optimus G
Click to expand...
Click to collapse
let us know how bloat removal goes and what method
mbonus said:
I thought I had root, but I still get the $ in adb shell
Click to expand...
Click to collapse
Well does the `cat /etc/vold.fstab` yielf anything? You *might* not need root access to read it. If it doesn't work, or says file not find, run
Code:
ls /etc/
I appreciate you being the guinipig here, just trying find some way to figure out what the block devices are, as I don't see them listed under /dev.
Ilkinansr92 said:
Idk I like the lg rom so far it is very smooth just gonna root and delete some bloatware
Sent from my LG Optimus G
Click to expand...
Click to collapse
mbonus said:
let us know how bloat removal goes and what method
Click to expand...
Click to collapse
^^this, and additionally what you decided to remove as well, if you don't mind, sir.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Mike>adb shell
[email protected]:/ $ su
su
[email protected]:/ # ls /dev
ls /dev
alarm
android_adb
android_mbim
apr_apps2
ashmem
binder
block
bus
ccid_bulk
ccid_ctrl
console
cpu_dma_latency
cpuctl
device-mapper
diag
dsp_debug
full
fuse
gemini0
genlock
graphics
hsicctl0
hsicctl1
hsicctl2
hsicctl3
hw_random
i2c-0
i2c-3
i2c-4
input
ion
keychord
kgsl-3d0
kmem
kmsg
lge_dm_tty0
log
mdm
media0
media1
media2
mem
msm_aac
msm_aac_in
msm_acdb
msm_amrnb
msm_amrnb_in
msm_amrwb
msm_amrwb_in
msm_camera
msm_dsps
msm_evrc
msm_evrc_in
msm_idle_stats0
msm_idle_stats1
msm_idle_stats2
msm_idle_stats3
msm_mp3
msm_multi_aac
msm_qcelp
msm_qcelp_in
msm_rotator
msm_rtac
msm_sps
msm_vidc_dec
msm_vidc_dec_sec
msm_vidc_enc
msm_vidc_reg
msm_wma
msm_wmapro
mtp_usb
network_latency
network_throughput
nmea
null
pipes
pn544
ppp
psaux
ptmx
pts
qmi0
qmi1
qmi2
qseecom
ramdump_dsps
ramdump_lpass
ramdump_riva
ramdump_smem-dsps
random
rfkill
rmnet_mux_ctrl
rtc0
siI-8334
smd1
smd11
smd2
smd21
smd22
smd27
smd3
smd36
smd4
smd5
smd6
smd7
smd_cxm_qmi
smd_pkt_loopback
smd_sns_adsp
smd_sns_dsps
smdcntl0
smdcntl1
smdcntl2
smdcntl3
smdcntl4
smdcntl5
smdcntl6
smdcntl7
smdcntl8
smem_log
snd
socket
tgt
tpa_amp
tspdrv
tty
tty0
tty1
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty2
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty3
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty4
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty5
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty6
tty60
tty61
tty62
tty63
tty7
tty8
tty9
ttyGS0
ttyUSB0
tun
uinput
urandom
usb
usb_accessory
usb_autorun
usf1
v4l-subdev0
v4l-subdev1
v4l-subdev2
v4l-subdev3
v4l-subdev4
v4l-subdev5
v4l-subdev6
v4l-subdev7
v4l-subdev8
vcs
vcs1
vcs63
vcsa
vcsa1
vcsa63
video0
video1
video100
video2
video3
video38
video39
wcnss_wlan
xt_qtaguid
zero
[email protected]:/ # df
df
Filesystem Size Used Free Blksize
/dev 911.16M 64.00K 911.10M 4096
/mnt/asec 911.16M 0.00K 911.16M 4096
/mnt/obb 911.16M 0.00K 911.16M 4096
/system 1.46G 1.06G 411.95M 4096
/data 11.30G 1.74G 9.55G 4096
/persist 7.86M 4.09M 3.77M 4096
/cache 787.39M 17.28M 770.11M 4096
/persist-lg 7.86M 4.11M 3.75M 4096
/mpt 31.48M 4.04M 27.45M 4096
/factory 15.73M 4.04M 11.69M 4096
/sns 7.86M 4.05M 3.81M 4096
/tombstones 251.97M 4.15M 247.82M 4096
/firmware 63.95M 52.84M 11.11M 16384
/mnt/sdcard 11.30G 1.74G 9.55G 4096
/mnt/sdcard/external_sd 14.70G 9.28M 14.69G 32768
[email protected]:/ # cat /etc/vold.fstab
cat /etc/vold.fstab
# Copyright (c) 2011, Code Aurora Forum. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Code Aurora Forum, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# LGE_CHANGE For MTP
dev_mount sdcard2 /mnt/sdcard/external_sd auto /devices/platform/msm_sdcc.3/mmc_
host
[email protected]:/ #[COLOR="Silver"]
[SIZE=1]---------- Post added at 08:14 PM ---------- Previous post was at 08:13 PM ----------[/SIZE]
[/COLOR]Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Mike>adb shell
[email protected]:/ $ su
su
[email protected]:/ # ls /etc/
ls /etc/
DxHDCP.cfg
NOTICE.html.gz
OperatorPolicy.xml
UserPolicy.xml
amazon-kindle.properties
apns-conf.xml
apns_kr_mpdn.xml
apns_lgu_mpdn.xml
audio_effects.conf
bluetooth
capability.xml
dbus.conf
dcm_settings.xml
dhcpcd
efs.txt
es310.bin
event-log-tags
factory_reset_magic
fallback_fonts.xml
featureset.xml
firmware
format_first.sh
fota
gps.conf
hosts
init.goldfish.sh
init.lge_dut.bt.sh
init.qcom.bt.sh
init.qcom.coex.sh
init.qcom.efs.sync.sh
init.qcom.fm.sh
init.qcom.ftm_module.sh
init.qcom.ftm_module_out.sh
init.qcom.mdm_links.sh
init.qcom.modem_links.sh
init.qcom.post_boot.sh
init.qcom.sdio.sh
init.qcom.thermald_conf.sh
init.qcom.wifi.sh
init.wlan-on-off.sh
last_kmsg_backup.sh
logger_events.sh
logger_kernel.sh
logger_main.sh
logger_packet.sh
logger_radio.sh
logger_system.sh
logging_android.sh
logging_android_apart.sh
logging_kernel.sh
logging_kernel_apart.sh
logging_prepare.sh
mQ128-v44se.dls
media_profiles.xml
mkshrc
mts_mask
nfcee_access.xml
null_page
omadm
permissions
ppp
qosmgr_rules.xml
readahead_list.txt
save_kernel_log.sh
security
settings.xml
snd_soc_msm
system_fonts.xml
telephony.xml
thermald.conf
updatecmds
usf_post_boot.sh
vold.fstab
wfdconfig.xml
wifi
wiperconfig.xml
[email protected]:/ #
---------- Post added at 08:17 PM ---------- Previous post was at 08:14 PM ----------
mbonus said:
I thought I had root, but I still get the $ in adb shell
Click to expand...
Click to collapse
i'm such a newb, I didn't notice the phone had a superuser dialog box open requesting approval.
Okay the vold.fstab gave me a bit more info that I needed. Post the output of 'ls /devices/platform/' please. Again I do apologise for all the commands but this is set up a bit different than my heroc or touchpad, so just having to work through things through you, I do appreciate it though!
Also you can use the
Code:
[/code ] tags to post things in code boxes.
Sent from my cm_tenderloin using xda app-developers app
Shelnutt2 said:
Okay the vold.fstab gave me a bit more info that I needed. Post the output of 'ls /devices/platform/' please. Again I do apologise for all the commands but this is set up a bit different than my heroc or touchpad, so just having to work through things through you, I do appreciate it though!
Also you can use the
Code:
[/code ] tags to post things in code boxes.
Sent from my cm_tenderloin using xda app-developers app[/QUOTE]
Hey Shelnutt, thanks for jumping on this so early. Really thinkin about making this my next device and getting the bootloader unlocked will seal the deal.
Based on what you've seen so far, do you think any progress can be made?
I'd be willing to get the device and be a guinea pig as well....
Click to expand...
Click to collapse
Hello.
Where is stored the raw file for the User Dictionary of HTC Sense Input keyboard ? It's obviously not the classic /data/data/com.android.providers.userdictionary/databases/user_dict.db ... because I wiped the file, rebooted, and HTC SI still kept memories of some words. After using backup restaure tools like UDM, HTCSI also can't see new words.
Thanks.
State of art:
For every one: the classic user dictionary is in /data/data/com.android.providers.userdictionary/databases/user_dict.db as SQLite3 . It's very easy to extract:
echo "SELECT word FROM words;" | sqlite3 /data/local/tmp/user_dict.db | sort | uniq | sed ':a;N;$!ba;s/\n/\|/g' > /data/local/tmp/PersonalDictionary.htcudb
providing you have SQLite3 somewhere in your PATH.
The base HTC IME dictionary is here: /data/data/com.htc.sense.ime/app_db/dlm_export
The SD backup is not on emulated (I have asked for emulated SD from internal memory), but on real physical external SD:
/storage/ext_sd/.data/HTC_IME/PersonalDictionary
The method to find the two last files were:
- touch /data/local/tmp/plop
- make a change in the dic, or a backup
- find /storage/ext_sd/ -newer /data/local/tmp/plop
or
- find /data/data -newer /data/local/tmp/plop
You have to re-touch the plop each time.
Once /data/data/com.android.providers.userdictionary/databases/user_dict.db is exported into /data/local/tmp/PersonalDictionary.htcudb, two things are possible:
- copy the file into /storage/ext_sd/.data/HTC_IME/PersonalDictionary, and make a manual import from HTC Sense Input dictionary manager
- attach the file to an email, and open the attachement from HTC-Mail, what will restaure the attached backup.
I have found the following command to ask for restauring the backup:
Code:
am start -a android.intent.action.VIEW -d "content:" -t "application/ime-config" -n com.htc.sense.ime/.ui.RestoreUDB -f "0x00080001"
But I do not get the confirmation toast. Because I don't find where the cache file is stored by HTC-Mail, for IME. Since I run stuff from scripts, that command does not work as is; in my case, I have to run it in this context:
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb connect 127.0.0.1
adb shell id
adb shell su -c id
adb shell su -c am start [...]
otherwise I get a nasty error about permission issues:
Starting: Intent { act=android.intent.action.VIEW dat=content: typ=application/ime-config flg=0x80001 cmp=com.htc.sense.ime/.ui.RestoreUDB }
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=content: typ=application/ime-config flg=0x10080001 cmp=com.htc.sense.ime/.ui.RestoreUDB } from null (pid=29007, uid=2000) requires com.htc.permission.APP_DEFAULT
Click to expand...
Click to collapse
Work for an other day:
- try to construct the am start call for backup restauration from SD (previous line was for email attachement) => give up
- find how to export and rebuild (via script) /data/data/com.htc.sense.ime/app_db/dlm_export
- find if this dictionary is gaining, or loosing any word => stats now on way: cron is recording daily the size of files
- remove dups from /data/data/com.android.providers.userdictionary/databases/user_dict.db (clean PROVIDER file)
- during export, I want to inject Contact details (first name, name, town name)
*** *** ***
The base problem I have is that HTC Sens keyboard is very good, for daily use, but randomly looses settings, and parts of the dics (some times words added the last days; some times 98% of it, only keeping 10 or 15 words).
I want to monitor the IME dic, and produce a system alert when this dic is found to have lost words, and after user confirmation, restaure the IME dic (with an older version of the file, or by rebuilding it).
Some other files may be interesting, in the same folder: mdb_contact_name seem to be a raw text version of com.android.providers.userdictionary/databases/user_dict.db . stm_dump is also very large. IME dictionary has a concept of alias (and auto-replace); but I don't know where this is stored. I also wonder where the word usage statistics are stored (for suggestions).
The big minus I found in this keyboard is that suggestions are always limited to 3 words on the first line (the one always available) (in portrait); Gingerbread and Hackers offer up to 12 words: as much as they can print on screen. Also, suggestions only include literal words: words with letters only; it never suggests words with numbers (unless I already typed one in currect word) or punctuation (statistics show that some words are very often followed by question mark, comma, or full stop).
Now that I am used to the height of HTC Sens keyboard, I make many typos with smaller boards; but smaller boards leave much more screen space for chat. Sens is very good for writing emails; but instant messaging like Skype and Yahoo use too much screen space, and smaller kbd would leave more chat history visible. But Sens has a better word prediction for intuitive chat ...
***
Recoding daily stats of files:
Code:
find /data/data/com.htc.sense.ime/app_db/dlm_export.history -mtime 0 | grep "e" || {
for i in dlm_export mdb_contact_name stm_dump
do
{ echo -n "$(date +%Y-%m-%d_%H-%M-%S) : " ; ls -l /data/data/com.htc.sense.ime/app_db/$i | awk '{print $4}' ; } >> /data/data/com.htc.sense.ime/app_db/${i}.history
done
This code will work even with non existing history. Then wait history is 1D old .... I have found that one history per file is easier to re-read than one for all. Injecting date this way date +%Y-%m-%d_%H-%M-%S ; echo -n " : " used to introduce an undesired NL..
Proof that stupid dictionary bugs:
Code:
-rw------- 1 root root 0 2016-01-24 23:40 dlm_export
-rw------- 1 root root 1274 2015-09-02 10:15 kdb_0c09.cfg
-rw------- 1 root root 1274 2016-01-24 02:29 kdb_0c0c.cfg
-rw------- 1 root root 1281 2014-10-08 14:56 kdb_0d03.cfg
-rw------- 1 root root 1250 2015-12-20 18:18 kdb_0d09.cfg
-rw------- 1 root root 1250 2016-01-24 23:48 kdb_0d0c.cfg
-rw------- 1 root root 28902 2016-01-25 17:01 mdb_contact_name
-rw------- 1 root root 20 2016-01-25 17:01 sc_mdb_contact_name
-rw------- 1 root root 0 2016-01-24 23:40 stm_dump
-rw------- 1 root root 0 2016-01-25 17:01 tc_mdb_contact_name
-rw------- 1 root root 83251 2016-01-29 20:01 dlm_export
-rw------- 1 root root 1274 2015-09-02 10:15 kdb_0c09.cfg
-rw------- 1 root root 1274 2016-01-29 07:30 kdb_0c0c.cfg
-rw------- 1 root root 1281 2014-10-08 14:56 kdb_0d03.cfg
-rw------- 1 root root 1250 2015-12-20 18:18 kdb_0d09.cfg
-rw------- 1 root root 1250 2016-01-29 19:48 kdb_0d0c.cfg
-rw------- 1 root root 28954 2016-01-29 20:57 mdb_contact_name
-rw------- 1 root root 20 2016-01-29 20:57 sc_mdb_contact_name
-rw------- 1 root root 225751 2016-01-29 09:57 stm_dump
-rw------- 1 root root 0 2016-01-29 20:57 tc_mdb_contact_name
-rw------- u0_a39 u0_a39 145060 2016-02-04 23:44 dlm_export
-rw------- root root 29 2016-02-05 01:01 dlm_export.history
-rw------- u0_a39 u0_a39 1274 2015-09-02 10:15 kdb_0c09.cfg
-rw------- u0_a39 u0_a39 1274 2016-02-04 21:20 kdb_0c0c.cfg
-rw------- u0_a39 u0_a39 1281 2014-10-08 14:56 kdb_0d03.cfg
-rw------- u0_a39 u0_a39 1250 2015-12-20 18:18 kdb_0d09.cfg
-rw------- u0_a39 u0_a39 1250 2016-02-05 00:32 kdb_0d0c.cfg
-rw------- u0_a39 u0_a39 29036 2016-02-05 00:32 mdb_contact_name
-rw------- root root 57 2016-02-05 01:01 mdb_contact_name.history
-rw------- u0_a39 u0_a39 20 2016-02-05 00:32 sc_mdb_contact_name
-rw------- u0_a39 u0_a39 225751 2016-02-04 16:07 stm_dump
-rw------- root root 59 2016-02-05 01:01 stm_dump.history
-rw------- u0_a39 u0_a39 0 2016-02-05 00:32 tc_mdb_contact_name
Clearly: dlm_export and stm_dump were empty 2 weeks ago. Due to the nature of cheap backup, I was wondering if by huge hasard, those files were empty due to rsync glitches (if wifi is lost during file transfert, and glitch occurs while working on THIS file ... one chance in a trillion): such a glitch may produce an empty file; one, and ONE ONLY. Not two: rsync can't have corrupted dlm_export AND stm_dump at the same time. Thus, they are both empty due to a HTC Sens bug. The one that often makes the IME forget about second lang, and no vibrator.
Nobody knows if the loss of content of dlm_export could be related to HTC Sense keyboard issues ?
I wiped /data/misc/ to get out of a recovery bootloop. Turns out that doing so breaks the wifi mac address in CM. I'm able to temporarily set my address in /data/wifi/misc/config:
Code:
echo "cur_etheraddr=XX:XX:XX:XX:XX:XX" > /data/misc/wifi/config
The problem is that when I reboot, that file goes back to 00:00:00:00:00:00.
Digging around CM kernel source showed me what files are important.
Code:
CONFIG_BCMDHD_FW_PATH="/system/etc/firmware/fw_bcmdhd.bin"
CONFIG_BCMDHD_NVRAM_PATH="/system/etc/wifi/bcmdhd.cal"
CONFIG_BCMDHD_CONFIG_PATH="/data/misc/wifi/config"
/system/etc/wifi/bcmdhd.cal is showing a good mac address.
I KDZ'ed back to stock and everything worked great there. As soon as I flashed CM14.1 again it didn't work. It isn't a problem with the build, since it was working until I wiped /data/misc/.
Does anyone know how to fix this? I'm curious what config says on a working device, so could someone tell me what it says for them? I want to know 1) if /data/misc/wifi/config exists and 2) if it shows a real mac address or a bunch of zeros. I can't get CM file manager to open the file, so here's how to do it in adb:
Code:
adb shell "su 0 cat '/data/misc/wifi/config'"
What files are in /data/misc/wifi?
I'm not really looking for a workaround, since I could add that first script to a startup script or something. I want a permanent fix that won't go away next time I flash a rom.
Sorry for the long post. Any help would be appreciated. I've spend hours on this already.
Hi!
I also use your workaround now and i automated it, so thanks for ending my pain for the moment, but i would also like to see a permanent fix for this. I tried every available stock rom and all available methods to aply it to bring back what cm seams to be depending on for setting the mac - but no success. To me this looks like a bug - not a very common one, but still a bug because the stock roms do not have any problem at all, only cm does.
br, Martin
theprogramguy said:
Does anyone know how to fix this? I'm curious what config says on a working device, so could someone tell me what it says for them? I want to know 1) if /data/misc/wifi/config exists and 2) if it shows a real mac address or a bunch of zeros.
.
Click to expand...
Click to collapse
I am on RR ROM which is CM based
What I can say is yes this file exists and yes it contains my real MAC address
theprogramguy said:
What files are in /data/misc/wifi?
.
Click to expand...
Click to collapse
[email protected]:/ # ls -la /data/misc/wifi
total 152
drwxrwx--- 4 wifi wifi 4096 2016-12-14 08:12 .
drwxrwx--t 32 system misc 4096 2016-12-04 19:44 ..
-rw-r--r-- 1 system wifi 32 2015-01-02 02:58 config
-rw-rw---- 1 system wifi 21 2015-01-22 07:44 entropy.bin
-rw-rw---- 1 system wifi 252 2016-11-17 15:05 hostapd.conf
-rw------- 1 system system 868 2016-11-14 08:33 ipconfig.txt
-rw------- 1 system system 29695 2016-12-13 11:04 networkHistory.txt
-rw-rw---- 1 wifi wifi 219 2015-01-22 07:44 p2p_supplicant.conf
drwxrwx--- 2 wifi wifi 4096 2015-01-22 07:44 sockets
-rw------- 1 system system 41 2016-11-17 14:54 softap.conf
drwxrwx--- 2 wifi wifi 4096 2015-01-02 02:58 wpa_supplicant
-rw-rw---- 1 wifi wifi 1647 2016-12-14 08:12 wpa_supplicant.conf
[email protected]:/ #
My first thought was that the mac address is generated from the misc partition but as far as I can see it seems to be not. At least I can't find a string matching my current mac.
interesting is that I searched the misc partition (I love Linux and the tool strings) and found my imei written in there..
Well as you wrote you haven't the problem on stock:
Do you cleaned out the WiFi config file before when testing stock? Afaik it should be cleaned out automatically though but just to be sure.. What happens when you delete that file on stock and reboot? Will it get regenerated?
You identified it that the ROM sources are the reason good. But I don't think you should look at the kernel sources only. Check the CM sources as well I believe here you will get better findings.
.
steadfasterX said:
[email protected]:/ # ls -la /data/misc/wifi
total 152
drwxrwx--- 4 wifi wifi 4096 2016-12-14 08:12 .
drwxrwx--t 32 system misc 4096 2016-12-04 19:44 ..
-rw-r--r-- 1 system wifi 32 2015-01-02 02:58 config
-rw-rw---- 1 system wifi 21 2015-01-22 07:44 entropy.bin
-rw-rw---- 1 system wifi 252 2016-11-17 15:05 hostapd.conf
-rw------- 1 system system 868 2016-11-14 08:33 ipconfig.txt
-rw------- 1 system system 29695 2016-12-13 11:04 networkHistory.txt
-rw-rw---- 1 wifi wifi 219 2015-01-22 07:44 p2p_supplicant.conf
drwxrwx--- 2 wifi wifi 4096 2015-01-22 07:44 sockets
-rw------- 1 system system 41 2016-11-17 14:54 softap.conf
drwxrwx--- 2 wifi wifi 4096 2015-01-02 02:58 wpa_supplicant
-rw-rw---- 1 wifi wifi 1647 2016-12-14 08:12 wpa_supplicant.conf
[email protected]:/ #
Click to expand...
Click to collapse
Here's mine. It seems practically the same just missing hostapd.conf. I think I've seen it here before though.
h811:/ # ls -la /data/misc/wifi
total 44
drwxrwx--- 4 wifi wifi 4096 2016-12-14 17:07 .
drwxrwx--t 39 system misc 4096 2014-12-31 19:21 ..
-rw-r--r-- 1 system wifi 32 2016-12-12 18:32 config
-rw-rw---- 1 system wifi 21 2016-12-13 03:15 entropy.bin
-rw------- 1 system system 166 2016-12-13 03:25 ipconfig.txt
-rw------- 1 system system 3814 2016-12-14 17:07 networkHistory.txt
-rw-rw---- 1 wifi wifi 237 2014-12-31 19:26 p2p_supplicant.conf
drwxrwx--- 2 wifi wifi 4096 2016-12-13 03:15 sockets
-rw------- 1 system system 49 2014-12-31 19:25 softap.conf
drwxrwx--- 2 wifi wifi 4096 2014-12-31 19:21 wpa_supplicant
-rw-rw---- 1 wifi wifi 949 2016-12-14 17:07 wpa_supplicant.conf
steadfasterX said:
My first thought was that the mac address is generated from the misc partition but as far as I can see it seems to be not. At least I can't find a string matching my current mac.
Click to expand...
Click to collapse
Maybe it matches the mac in /system/etc/wifi/bcmdhd.cal (macaddr=)? I found that I had a slightly different one there.
steadfasterX said:
You identified it that the ROM sources are the reason good. But I don't think you should look at the kernel sources only. Check the CM sources as well I believe here you will get better findings.
Click to expand...
Click to collapse
https://github.com/CyanogenMod/android_device_lge_g4-common/blob/cm-14.1/hwaddrs/getmac.c
I found this earlier and it shows CM mounting misc and doing something with /data/misc/wifi/config. I thought it was reading config, but it looks like it's actually writing it there after reading it from somewhere else in misc. That would explain why it gets reset. Do you understand where it's reading from? I'm having a hard time reading C.
Specifically this part:
Code:
int fd1, fd2;
char macbyte;
char macbuf[3];
int i;
fd1 = open("/dev/block/bootdevice/by-name/misc",O_RDONLY);
fd2 = open("/data/misc/wifi/config",O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
write(fd2,"cur_etheraddr=",14);
for (i = 0; i<6; i++) {
lseek(fd1,0x3000+i,SEEK_SET);
lseek(fd2,0,SEEK_END);
read(fd1,&macbyte,1);
sprintf(macbuf,"%02x",macbyte);
write(fd2,&macbuf,2);
if (i!=5) write(fd2,":",1);
}
It looks like our bluetooth mac is getting set in the same way later on.
I'm thinking about setting up a CM build environment again and playing with my own builds to try to see what's up.
steadfasterX said:
interesting is that I searched the misc partition (I love Linux and the tool strings) and found my imei written in there..
Click to expand...
Click to collapse
Nice. I just looked at what CM is reporting my IMEI as, to see if it got reset, but it looks good. I know that cell data is still working, so I'd expect my IMEI to be right.
steadfasterX said:
Well as you wrote you haven't the problem on stock:
Do you cleaned out the WiFi config file before when testing stock? Afaik it should be cleaned out automatically though but just to be sure.. What happens when you delete that file on stock and reboot? Will it get regenerated?
Click to expand...
Click to collapse
I didn't try that. I was in a hurry to get back to CM so I could set it up for daily use. I'll try doing stuff like that soon if we don't figure have anything else to go on. It's getting too late to do it here tonight.
Yesterday I tried to extract misc.img from the kdz but none of the tools I found were able to successfully do it. Something was corrupt. My plan was to look at it or flash it in fastboot and see if anything changes.
GOT IT!
It's actually pretty simple, but I've never done anything quite like this before.
Overview:
Make an img of misc
Edit it in a hex editor
Overwrite misc with the img
Reboot
You could do this entirely on your phone, but I'll walk you through doing it using adb on your computer.
1. Make an img of misc and pull it to your computer.
Code:
adb shell "su -c 'dd if=/dev/block/bootdevice/by-name/misc of=/sdcard/misc.img'"
adb pull /sdcard/misc.img
2. Edit misc.img in a hex editor (I used HexEdit on Windows)
Find the hex offset 3000. Now edit 3000-3005 with your wifi mac address. For example "00 90 3D F1 A2 31".
The bluetooth mac address appears to be stored at 4000, so you could set it there if you wanted/needed to.
3. Write the img
Code:
adb push misc.img /sdcard/misc_edited.img
adb shell "su -c 'dd if=/sdcard/misc_edited.img of=/dev/block/bootdevice/by-name/misc'"
4. Reboot
Code:
adb reboot
If it all works, it's okay to delete the img files we left in /sdcard
Code:
adb shell "rm /sdcard/misc*.img"
Makes totally sense! Just for your information the file in
/system/etc/wifi/bcmdhd.cal
contains a mac address but it is not the same as in the Wi-Fi config file
Thanks for sharing this walkthrough it will help others having the same issue
Thank you!!
You are a MF genius!!! I have the same problem but with an LG G3 Beat, and I wanted to know if this works the same with my device. Thank you bro!