[Q] IMEI Repair Help! - Samsung Galaxy Nexus

I've researched this extensively and still not finding the solution I need. I recently flashed a ROM to my GNEX (unlocked from Google Play store). I'm not sure at what point it happened, but my /factory/ folder seems to have been emptied. So now I'm getting a generic IMEI that is blocked y my carrier T-Mobile. I'm getting absolutely no service.
Strangely I had no backup other than a backup of all my apps and data from Titanium backup, but I doubt there is anything useful in there. I have since reset my phone several times, removed the battery for 20 minutes, flashed the stock version of android that came with the phone...
my radio folder looks like this:
/data/radio/
nv_data.bin
nv_data.bin.md5
log folder
The log folder contains nv.log which contains the following:
Sat May 24 21:01:16 2014: __refresh_md5_file: Can't open /factory/nv_data.bin.md5. Read-only file system.
Sat May 24 21:01:16 2014: MD5 is turned on.
Sat May 24 21:01:16 2014: /data/radio/nv_data.bin does not exist.
Sat May 24 21:01:17 2014: default NV restored.
Sat May 24 21:20:43 2014: __refresh_md5_file: Can't open /factory/nv_data.bin.md5. Read-only file system.
Sat May 24 21:20:43 2014: MD5 is turned on.
Sat May 24 21:25:23 2014: __refresh_md5_file: Can't open /factory/nv_data.bin.md5. Read-only file system.
Sat May 24 21:25:23 2014: MD5 is turned on.
Sat May 24 21:31:56 2014: __refresh_md5_file: Can't open /factory/nv_data.bin.md5. Read-only file system.
Sat May 24 21:31:56 2014: MD5 is turned on.
Sat May 24 21:33:07 2014: __refresh_md5_file: Can't open /factory/nv_data.bin.md5. Read-only file system.
Sat May 24 21:33:07 2014: MD5 is turned on.
Sun May 25 00:51:15 2014: __refresh_md5_file: Can't open /factory/nv_data.bin.md5. Read-only file system.
Sun May 25 00:51:15 2014: MD5 is turned on.
my /factory/ folder was empty, but I copied the two files from my radio folder in the factory folder to see if that would help. I think that changed the messages in the log file but did not fix the problem. I know I need to repair my IMEI, but I'm not sure how. I would GREATLY appreciate any help. Thanks!

Related

[BOOT ANIMATION]SGS2 BIOS with Sound

This is based on the great work done by animelover - all credit goes to him.
NOTE: This is flashable via a custom recovery, like CWM
Preview:
http://www.youtube.com/watch?v=6NLi1-O8PJY
EDIT 9/27: Due to some tricky stuff Samsung/Sprint did with the boot animation, I edited this update script to remove the bootsamsung.qmg and bootsamsungloop.qmg files, enabling this to work with all ROMs regardless of if you're on stock kernel or not.
EDIT 10/27: Make sure you wipe Dalvik and Cache before rebooting after applying this.
EDIT 11/14: Some have reported that they have issues using this with their custom ROMs. Make sure you follow the manual steps some have identified below if that is you.
Download E4GT Animation
This is really nice. Anyone try it on our phones yet?
jirafabo said:
This is really nice. Anyone try it on our phones yet?
Click to expand...
Click to collapse
Yeah works and looks great. I also changed my startup sound to the old school mac startup sound and now I love it even more! I'm using Zedomax kernel v3 by the way.
jirafabo said:
This is really nice. Anyone try it on our phones yet?
Click to expand...
Click to collapse
I have modified this to work on any kernel/ROM for the E4GT. Works great.
Hi I flashed this via CWM and it works looks and sounds great. However after the boot animation is done, my screen goes blank for about 10 seconds then finally is done booting. Is this normal? I had previously tried installing by using zedomaxs guide using root explorer where u just copy and paste into system/media directory. Maybe I have some wrong or extra files in there? Sorry for such a long post
Edit: oh and I'm running zedomaxs v3 kernel and starburst rom if that helps. Thanks.
Sent from my SPH-D710 using XDA App
rsalinas1 said:
Hi I flashed this via CWM and it works looks and sounds great. However after the boot animation is done, my screen goes blank for about 10 seconds then finally is done booting. Is this normal? I had previously tried installing by using zedomaxs guide using root explorer where u just copy and paste into system/media directory. Maybe I have some wrong or extra files in there? Sorry for such a long post
Edit: oh and I'm running zedomaxs v3 kernel and starburst rom if that helps. Thanks.
Sent from my SPH-D710 using XDA App
Click to expand...
Click to collapse
Shouldn't make a difference. I recommend that you use CWM to wipe Dalvik and Cache then boot.
Boot Animation Troubleshooting
To report issues please provide as much information as possible so that someone can assist you. This would consist of:
ROM and Kernel you are using
Did you wipe dalvik and cache before booting?
The barometric pressure and the phase of the moon when you had a problem
Were you under the influence of any mind-altering substance?
Before you report a problem - please try these simple steps:
Wipe dalvik and cache in CWM
Reboot if you have a problem and verify it still exists
Most problems are resolved by the above. If not, then please post your issue.
Well..?? Followed the steps and have the sound but it's still the stock android boot animation. Running bubbys stock rooted kernel with CWM. And AEmods rom.
Samsung Galaxy S II
stangdriverdoug said:
Well..?? Followed the steps and have the sound but it's still the stock android boot animation. Running bubbys stock rooted kernel with CWM. And AEmods rom.
Samsung Galaxy S II
Click to expand...
Click to collapse
can you post the result of this command when your phone is connected (assuming you can do adb to it)
adb shell ls -l /system/media
OK I wiped dalvik and cache then rebooted, still no luck. Tried again and still no luck. After boot animation, phone seems as if it's off for about 10-15 seconds before completely booting up.
Sent from my SPH-D710
jerdog said:
can you post the result of this command when your phone is connected (assuming you can do adb to it)
adb shell ls -l /system/media
Click to expand...
Click to collapse
ok, I ran it but I am not sure how to copy and paste it to here.
Edit: Got it.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\System32>cd c:\android\platform-tools
c:\Android\platform-tools>and devices
'and' is not recognized as an internal or external command,
operable program or batch file.
c:\Android\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
464119471A47A67E device
c:\Android\platform-tools>ls-i\system/media
The system cannot find the path specified.
c:\Android\platform-tools>adb devices
List of devices attached
464119471A47A67E device
c:\Android\platform-tools>ls -I/system/media
'ls' is not recognized as an internal or external command,
operable program or batch file.
c:\Android\platform-tools>ls -l /system/media
'ls' is not recognized as an internal or external command,
operable program or batch file.
c:\Android\platform-tools>adb shell ls -l /system/media
-rw-r--r-- 1 root root 21060 Aug 1 2008 Disconnected.qmg
drwxr-xr-x 6 root root 4096 Sep 27 07:52 audio
-rw-r--r-- 1 root root 21224 Aug 1 2008 battery_batteryerror.qm
g
-rw-r--r-- 1 root root 22216 Aug 1 2008 battery_charging_10.qmg
-rw-r--r-- 1 root root 19636 Aug 1 2008 battery_charging_100.qm
g
-rw-r--r-- 1 root root 22408 Aug 1 2008 battery_charging_15.qmg
-rw-r--r-- 1 root root 22540 Aug 1 2008 battery_charging_20.qmg
-rw-r--r-- 1 root root 22804 Aug 1 2008 battery_charging_25.qmg
-rw-r--r-- 1 root root 22724 Aug 1 2008 battery_charging_30.qmg
-rw-r--r-- 1 root root 22804 Aug 1 2008 battery_charging_35.qmg
-rw-r--r-- 1 root root 22880 Aug 1 2008 battery_charging_40.qmg
-rw-r--r-- 1 root root 23036 Aug 1 2008 battery_charging_45.qmg
-rw-r--r-- 1 root root 22144 Aug 1 2008 battery_charging_5.qmg
-rw-r--r-- 1 root root 22948 Aug 1 2008 battery_charging_50.qmg
-rw-r--r-- 1 root root 23020 Aug 1 2008 battery_charging_55.qmg
-rw-r--r-- 1 root root 23100 Aug 1 2008 battery_charging_60.qmg
-rw-r--r-- 1 root root 23264 Aug 1 2008 battery_charging_65.qmg
-rw-r--r-- 1 root root 23164 Aug 1 2008 battery_charging_70.qmg
-rw-r--r-- 1 root root 23236 Aug 1 2008 battery_charging_75.qmg
-rw-r--r-- 1 root root 23320 Aug 1 2008 battery_charging_80.qmg
-rw-r--r-- 1 root root 23292 Aug 1 2008 battery_charging_85.qmg
-rw-r--r-- 1 root root 23368 Aug 1 2008 battery_charging_90.qmg
-rw-r--r-- 1 root root 23452 Aug 1 2008 battery_charging_95.qmg
-rw-r--r-- 1 root root 20688 Aug 1 2008 battery_error.qmg
-rw-r--r-- 1 root root 1739057 Aug 1 2008 bootanimation.zip
-rw-r--r-- 1 root root 21676 Aug 1 2008 chargingwarning.qmg
drwxr-xr-x 3 root root 4096 Sep 27 07:52 video
c:\Android\platform-tools>
stangdriverdoug said:
ok, I ran it but I am not sure how to copy and paste it to here.
Edit: Got it.
Click to expand...
Click to collapse
I don't know what to tell you on that. Every test I ran showed this worked. I will keep doing some testing and see what others have to say.
AEmod rom stock kernel no workie, sound works though.
jerdog said:
I don't know what to tell you on that. Every test I ran showed this worked. I will keep doing some testing and see what others have to say.
Click to expand...
Click to collapse
Any idea on why it might not be working for me? Thanks
Sent from my SPH-D710
jerdog, how does one install this without CWM? Can I delete Samsung's files and throw your animation into the appropriate folder or are the other files in the .zip important?
Problem solved. I switched to Zedomax's kernel V4 and sound and animation work.
Deleted post.
Sound and Animation working for me with Zedo v3 installed over AEMod 3.2. I also got the black screen for 10 or 15 sec after the first boot. I used one of the other bios animations and they have the little android guy after the initial animation. Was this removed for some reason because it would be nice to have put back in for when the phone needs to boot for a longer period of time (like after cache wipe or rom change.) Thanks for the mod!
Download link not working or is it just me?
Not working for me either
Sent from my SPH-D710 using XDA App

[Q] IMEI gone after Odin flash?! [FIXED]

Hello guys,
I got a big problem.
A friend of mine came with his Note 2 with MIUI and wanted me to put a stock rom back onto his device.
So I downloaded the lates Kies-compatible Rom for my Country from samfirmware.com and flashed it via Odin.
Everything went alright, but now the IMEI is 0049xxx?
On MIUI the IMEI was alright, but now on the Stock its gone?
Any idea how to fix this?
I didnt think that an odin flash would destroy an imei ever, so we didnt make an extra backup of the efs, and unfortunately there was also none on the sd...
So now I'll try to root and grab a backup of the efs folder now and try to restore it somehow.
Or can this be caused by rom compatibility issues? Like if i flash the "right" original rom that this fixes it?
===========
Last update:
Flashed the latest Stock DBT 4.1.2 Firmware from June 2013 with DME4 Modem and then the phone had its imei back.
Mustve been caused by incompatible modem im sure.
zroice said:
Hello guys,
I got a big problem.
A friend of mine came with his Note 2 with MIUI and wanted me to put a stock rom back onto his device.
So I downloaded the lates Kies-compatible Rom for my Country from samfirmware.com and flashed it via Odin.
Everything went alright, but now the IMEI is 0049xxx?
On MIUI the IMEI was alright, but now on the Stock its gone?
Any idea how to fix this?
I didnt think that an odin flash would destroy an imei ever, so we didnt make an extra backup of the efs, and unfortunately there was also none on the sd...
So now I'll try to root and grab a backup of the efs folder now and try to restore it somehow.
Or can this be caused by rom compatibility issues? Like if i flash the "right" original rom that this fixes it?
Click to expand...
Click to collapse
maybe u must have flashed new modem try rooting it again and installing miui again or try installing older rom 4.1.1
KaranBhoir said:
maybe u must have flashed new modem try rooting it again and installing miui again or try installing older rom 4.1.1
Click to expand...
Click to collapse
argh well so far I tried rooting and getting efs folder backup (even if its now corrupted there are the bak files) and then tried to restore with efspro but without success.
Downgraded to 4.1.1, same procedure, no success.
Then I wanted to use nandroid backup on the phone (of the miui afaik), but its not complete and cant be restored.
Starting to get frustrated and worried.
---
The problem is also that I don't know what original rom was on the phone - I guess 4.1.1, but which?!
Is there any way to find that out? My friend is kinda clueless about all this stuff and can't tell me what he had on.
Only thing he knows that he had 4.1.1 MIUI on before. I guess I try that.
well here i got the nv.log - it doesnt say anything about an error or something (on my searches I found that usually there are errors reported if the efs is corrupted) - so the efs should be actually intact or at least the bak or?
Code:
Sun Jan 1 00:02:03 2012: nv data does not exist
Sun Jan 1 00:02:03 2012: default NV restored
Sun Jan 1 00:02:11 2012: OFFSET_FOR_PRESET2 writing input
Sun Jan 1 00:02:11 2012: 2nd NV built
Sun Jan 1 00:02:12 2012: NV data back-uped
Sun Jan 1 00:08:35 2012: check off
Sun Jan 1 00:00:02 2012: check off
Mon Feb 18 16:11:55 2013: 2nd NV built
Mon Feb 18 16:11:55 2013: NV data back-uped
Mon Feb 18 16:11:55 2013: check on
Sun Jan 1 00:02:50 2012: check off
Sun Jan 1 00:03:14 2012: 2nd NV built
Sun Jan 1 00:03:14 2012: NV data back-uped
Sun Jan 1 00:03:14 2012: check on
Sun Jan 1 00:11:58 2012: fail - no checksum info
Sun Jan 1 00:11:58 2012: NV restored
Sun Jan 1 00:14:41 2012: OFFSET_FOR_PRESET1 writing input
Sun Jan 1 00:14:41 2012: 2nd NV built
Sun Jan 1 00:14:42 2012: NV data back-uped
Sun Jan 1 00:14:56 2012: OFFSET_FOR_PRESET2 writing input
Sun Jan 1 00:14:56 2012: 2nd NV built
Sun Jan 1 00:14:56 2012: NV data back-uped
Sun Jan 1 00:14:59 2012: OFFSET_FOR_PRESET2 writing input
Sun Jan 1 00:15:00 2012: 2nd NV built
Sun Jan 1 00:15:00 2012: NV data back-uped
Tue Jun 18 11:01:01 2013: input from cp
Tue Jun 18 11:01:01 2013: 2nd NV built
Tue Jun 18 11:01:01 2013: NV data back-uped
Mon Jul 22 20:06:21 2013: OFFSET_FOR_PRESET2 writing input
Mon Jul 22 20:06:21 2013: 2nd NV built
Mon Jul 22 20:06:21 2013: NV data back-uped
But why in hell does it not work then lol?
The Mon Jul 22 is my flash attempt of the stock rom, then right after imei was 0049 i rooted and pulled this efs.
Please someone help.
I think it might have to do with wrong modem firmware? But unfornutately I can't figure out what was on that thing originally.
Flashing over MiUI didnt help either.
As much as I love samsung, this efs sh*t really is annoying as hell. (I once tried to unsuccessfully revive a S3 before, and I had to give up frustrated eventually...)
Grmpf

[Q] Mail app attachment error: File browser stopped unexpectedly

HELP - i'm new at this -
I bought a HTC One M8sw off Ebay - it came from China. I can see based on the settings and using Root Checker Basic that it has been rooted and customised and I have SuperSU app showing up. Thus, I have a File manager installed which probably does not come as stock with the mobile? The file manager works fine. Issue is that, when I'm in the stock MAIL app and i try to attach a file by clicking on File or click on Document/PDF or Office Document - I get the following error:
------------------------------
Sorry!
File Browser has stopped unexpectedly
When I go into the error report:
It says the process which name is com.htc.FilePicker
-----------------------------------
I have gone through all the trouble shooting with HTC phone Support including clearing cache and data, rebooting, safe mode for 24 hours, deleting and re-adding email accounts, but still does not work. They have told me now that i need to a factory reset and see if this fixes it ... but i prefer not to do that as I don't want to remove all the amazing customisation which came with the phone as i wouldn't know how to get it back!
Anyone else experience this? Can you please let me know if there's anything i could do to fix this issue without going back to a factory reset? Any further information required?
Note: I'm not a techie ... so have limited to any knowledge on how to root, check root etc.
Well, are you running customized stock or are you on a custom rom?
Go into Settings > About tablet > Build number and post what you got there.
It could be that the former owner only removed the stock HTC file manager app. Do you have it in your app drawer?
Or check in system/priv-app/ and look for the FilePicker.apk.
If it is not there you could just download the stock firmware (whichever version you are on now), extract it and look in system/priv-app for the apk, copy it to the corresponding folder on your phone, set the permissions to read-only and reboot.
This is just a wild guess since I don't know what rom you are running, but it's a place to start...
berndblb said:
Well, are you running customized stock or are you on a custom rom?
Go into Settings > About tablet > Build number and post what you got there.
It could be that the former owner only removed the stock HTC file manager app. Do you have it in your app drawer?
Or check in system/priv-app/ and look for the FilePicker.apk.
If it is not there you could just download the stock firmware (whichever version you are on now), extract it and look in system/priv-app for the apk, copy it to the corresponding folder on your phone, set the permissions to read-only and reboot.
This is just a wild guess since I don't know what rom you are running, but it's a place to start...
Click to expand...
Click to collapse
In the Log file of Error - I see the following:
Type: crash
Process: com.htc.FilePicker
Time: 1414606270952
Device Active Time: -1
Flags: 0x4088be45
Package: com.htc.FilePicker v639000400 (6.0.767298)
Application Label: File Browser
System App: true
Installed By: null
App Active Time: -1
Build: htc/htc_europe/htc_m8dug:4.4.2/KOT49H/352881.12:user/release-keys
Project Branch: M8_DUGL_K44_SENSE60:379917
Changelist: 352881
Release: 4.4.2
Number of hibernations: 0
Time of resume from hibernation: unknown
Bootloader: 3.18.0.0000
Radio: 1.18.30306251.22G
----- KERNEL -----
Linux version 3.4.0-gcd8e74f ([email protected]) (gcc version 4.7 (GCC) ) #1 SMP PREEMPT Tue Jun 10 19:10:59 CST 2014
---------------
In the System/About - I see:
Build: 1.45.401.12.CL352881 release- keys
The File Manager is in the app drawer just like all other apps. I do not how to go to System/ priv to find the file picker.
Hope the above makes sense. Any help appreciated.
htcm8new said:
In the Log file of Error - I see the following:
Type: crash
Process: com.htc.FilePicker
Time: 1414606270952
Device Active Time: -1
Flags: 0x4088be45
Package: com.htc.FilePicker v639000400 (6.0.767298)
Application Label: File Browser
System App: true
Installed By: null
App Active Time: -1
Build: htc/htc_europe/htc_m8dug:4.4.2/KOT49H/352881.12:user/release-keys
Project Branch: M8_DUGL_K44_SENSE60:379917
Changelist: 352881
Release: 4.4.2
Number of hibernations: 0
Time of resume from hibernation: unknown
Bootloader: 3.18.0.0000
Radio: 1.18.30306251.22G
----- KERNEL -----
Linux version 3.4.0-gcd8e74f (ro[email protected]) (gcc version 4.7 (GCC) ) #1 SMP PREEMPT Tue Jun 10 19:10:59 CST 2014
---------------
In the System/About - I see:
Build: 1.45.401.12.CL352881 release- keys
The File Manager is in the app drawer just like all other apps. I do not how to go to System/ priv to find the file picker.
Hope the above makes sense. Any help appreciated.
Click to expand...
Click to collapse
Any Response from anyone out there in the interwebiverse?
htcm8new said:
Any Response from anyone out there in the interwebiverse?
Click to expand...
Click to collapse
It's really tough to give you any advice without knowing what modifications have been done to the stock system....
The best way would be to flash back to stock or flash a custom rom and start from there...
But then you would have to do find out which modifications have been done and redo them yourself. Sooner or later you probably have to anyway...
It's been suggested that I just delete the current HTC file browser and install another which may do the trick? Thoughts?
Possibly. I suggested something similar myself in an earlier post.
But a bit of learning will be involved....
The file browser is installed as a system app and you need root priviliges to uninstall it. Do you have root?
If not sure downlad RootChecker from the Play Store and run it.
I suspect to provide the functionality you want, the new file browser also needs to be installed as a system app (apps installed by the user are normally installed to data/app, factory loaded apps are in system/priv-app).
The difference between both is all about permissions which apps need within Android to be able to execute certain functions. User apps are way more restricted in what they are allowed to do and access than system apps.
You can accomplish both by using Titanium Backup (if you have root). It can uninstall system apps and it can covert an app installed by the user to a system app.
So to replace the current file browser you need to:
Get Titanium Backup, grant it root rights (which it will ask for when you launch it).
Backup (just a precaution) then uninstall the current file browser in TiBu
A little detour here:
You could give this a shot: Backup, then uninstall the file browser, reboot, then restore it in Titanuim Backup.
Reboot and check if you can attach files now. This would be an easy solution if the apk currently installed is not corrupted.
If that doesn't work:
Download a custom rom for your current rom version (was it 4.4.2?) that has the HTC file browser. I know that scrosler's roms (stock rooted or CleanROM) have it. Not sure about the many other roms for this phone.
Extract the zip file to it's own folder and drill down through them until you find system/priv-app.
Inside should be a file called FilePicker.apk. I believe that is the HTC file browser.
Copy that apk to your phone
In Settings > Security enable "unknown sources"
Using the phone's file browser find the apk, tap to install it.
Open Titanium Backup and find the newly installed app, convert it to a system app.
Reboot.
That would give you a fesh copy of the stock file browser.
Hope this helps.
Thanks for the detailed explanation. Steep learning to ensure i don't mess this up, but will take my time to make sure i understand everything stated in your explanation and then give it a crack over the wknd and let you know.

[ROM][5X][7.1.1r1] there's an internal problem with your device

I trying to build android 7.1.1r1 on nexus 5x, here are the steps:
1. Download the source by repo command (android-7.1.1_r1)
2. Download driver binaries from https://developers.google.com/android/drivers, code bullhead, NMF26, LG & Qualcomm
extract both files (LG,qualcomm), run shell script inside, extract-lge-bullhead.sh and extract-qcom-bullhead.sh on working folder
3. make clean
build/envsetup.sh
lunch aosp_bullhead-userdebug
make -j16
fastboot flashall -w (with bootloader unlocked)
4. when done , found some problems :
A. there's an internal problem with your device on screen
B. wifi connected but no internet conn
C. date back to 1 jan 1970 when reboot
for problem A can be fixed by http://forum.xda-developers.com/nexus-9/development/fix-build-prop-variety-fix-aka-contact-t3133347,
but can not for others.
I tried to flash vendor.img (from factory image) but still can not fix.
Please let me know if missed something, or if you have some clues for me to fix .
Thank you very much.
asepthea
I have exactly the same build config and issues as you, apart from Wi-Fi which works for me. However I have additionally flashed TWRP for the recovery image, and installed Open GApps.
I cannot find a resolution of the date reset issue. I have seen only a few references to the same issue and does not appear to be specific to the 7.1.1 build (I have seen references back to 4.4 stating the same). The best I can kind is issues relating to the vendor binary images. On one thread I read, someone fixed the issue by loading the factory image (which does work as expected for 7.1.1) and extracting the vendor binaries from the phone. However he did not describe how he did this. I assume he copied files/folders from the /vendors folder from the phone.
Yes correct, wifi can be fixed after remove wifi, set date & time and reconnect.
Reset date problem still can not fix, even i build android 7.0 always get same problems.
Partial solution
I did a lot of digging around on this, using the Clock_Offset.apk, but this had hit and miss success (need to use v2.0 with Nougat as the data is not symlink'ed to toolbox it is linked to toybox). Also Nougat does not appear to consume /data/local/userinit.sh, even with the init system mods.
First Attempt
My first solution was to use the Clock_Offset.apk to create the RTC offset which stores it in a file called /data/media/rtc_offset, then use a modified version of the Clock_Offset.apk script userinit.sh and place it under under SuperSU which should execute any executable script within /su/su.d/.
Code:
fixdate.sh
#!/system/bin/sh
# Fix date on AOSP Nougat builds
[[ -f /data/media/rtc_offset ]] && /system/bin/date @$(expr `cat /data/media/rtc_offset` + `cat /sys/class/rtc/rtc0/since_epoch`)
This appeared to work for me, however after re-flashing the phone and trying again I was back to square 1.
Actual partial solution
I flashed the phone with the factory image and using logcat I could see the factory image had the same issues with time_daemon, in that it failed to update the RTC (hwclock) and unable to update this at boot.
So the factory image appears to use a similar hack to Clock_Offset mod and uses the following files to track the time between reboots.
Code:
bullhead:/data/time # ls -l
total 16
-rw------- 1 system net_raw 8 2016-12-22 16:15 ats_1
-rw------- 1 system net_raw 8 2016-12-22 16:15 ats_2
Note that the factory image will not update these files if you update the date via the command line using the /system/date command. You can observe these updating whenever you change the date/time via the phone Date & time UI.
Basically you need these files off the factory image and move across to your AOSP build. There is obviously something missing from the AOSP build / vendor supplied binaries (for the Nexus 5x at least) that fails to create these files.
Once I copied these files off the factory image (root the phone and pull them off using adb) and copied over to the live AOSP build, the date and time is successfully remembered after boot. However nothing I do on the AOSP build forces an update of these files when changes the date/time on the phone. So it will remembered the date/time between reboots (as this is some type of offset between the hardware RTC and the Unix Epoch) so the time and date will be in sync forever more; however if you wish to change this date and time and remember this new offset between boots, you'll need to go back to the factory image to do the change and copy over the new ats_* files.
Which is why I'm suggesting this as a partial solution.
Solution
This post highlights that the service responsible for sync'ing or remembering the OS clock between reboots is a proprietary service called TimeService.apk, which is only bundled within the factory image.
I followed this post however was unable to get the exact steps to work with the Nexus 5x factory image for 7.1.1.
I then stumbled upon the make-gapps-zip project on Github.
Follow these steps to re-create an AOSP build that includes the TimeService.apk within the build.
Extract the entire contents of system image from the factory image (either using the steps in the original post highlighted above, or flash your phone with the factory image, root it, then zip up all of /system and transfer to your PC with adb)
Download odex2apk.py and oat2dex.jar from the make-gapps-zip Github page.
Run odex2apk.py on the extracted TimeService.apk from the factory image.
Added the updated TimeService.apk (with an Android.mk make file) to your AOSP build and re-build the AOSP
Flash your phone with the new AOSP build, set the date and time as normal, reboot and everything is good!
TimeService.apk update
I extracted the /system files from a rooted factory image, which I zipped up in a file called factory-system.tgz, and copied to /sdcard/Download.
Pull the file off the phone and unpack into a tmp directory.
Code:
$ adb pull /sdcard/Download/factory-system.tgz
$ tar xfz factory-system.tgz
Copy odex2apk.py and oat2dex.jar to the tmp directory and run the following command which re-creates TimeService.apk by extracting classes.dex from TimeService.odex and adding it back to TimeService.apk.
Note: If you want to re-run the step below (for experimentation, back up the original TimeService.apk).
Code:
$ ./odex2apk.py -f factory-system/framework factory-system/app/TimeService/TimeService.apk
This creates a new version of TimeService.apk that can be added to the AOSP build.
AOSP re-build
Add a folder called TimeService under packages/apps within the AOSP root folder, and copy the newly created TimeService.apk to this location.
Add a new file to this location called Android.mk and add the following.
Code:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := TimeService
LOCAL_MODULE_OWNER := lge
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
Then add the following to [AOSP Root]/vendor/lge/bullhead/device-vendor.mk
Code:
# Apps
PRODUCT_PACKAGES += \
TimeService
Re-run the AOSP make, flash the phone, and once you have updated the time using the OS date picker, you should fine the following files have been created.
Code:
bullhead:/data/time # ls -l
total 16
-rw------- 1 system net_raw 8 2017-01-03 18:00 ats_1
-rw------- 1 system net_raw 8 2017-01-03 18:00 ats_2
Reboot, and the date and time should be good.

Internal storage: Errors when bulk-writing small files

Hello fellow N5X owners,
I've just registered at XDA Developers (also I did read here a long time ago) because I experience some strange problems with internal storage of my device.
I've first noticed when I wanted to use an app which on first startup unpacks a large OBB file: Initial setup fails all the time stateing internal storage may be low. I checked storage, there is enough space left. The curious thing is that it always failed at different percentages and after countless attempts it even finished successfully once.
Further investigating it, I tried to install the app on other Android devices (including another Nexus 5X, both phones are on build OPM2.171019.029), which worked flawlessly. Also I did a a "factory reset" by unrooting and re-flashing the latest stock ROM on my device, which did not help.
I then took a closer look at the OBB (the app is open source, so this was easily possible) and tried to manually extract the OBB ZIP file on my device. This did not work either: Same behavior, Total Commander randomly fails unpacking it with message "Error unpacking: Error writing target file" (perhaps not in this wording, my Android is on German).
Since I suspected the ZIP file (although it's working fine on other devices), I created some ZIP files myself.
Unpacking them on the device, I was able to observe the following:
ZIPs containing large files (for example MP3 files, even if this is pretty pointless) work OK
ZIPs containg a lot of small files (like the original OBB, which contains several hundred files between 100 KiB and 1 MiB) will show the same error
Apart from that, I don't experience any issues with the device (no reboots, force closed apps etc).
Does anybody have an idea on what's going on here? I would RMA it (one month of guarantee left), but I'm afraid that this error will not be reproduced at the service center.
EDIT: I just noticed, that it does not seem to be related only to ZIP files. I connect the device to my PC and copied a large amount of MP3s to it, which finished successfully, everything OK. Then I copied a large amount of small files (the ones from the ZIP archive) and after some time Windows Explorer did not show progress anymore (even though the files are only a few 100 KiB large, after some time name of the file currently copied did not change anymore).
EDIT2: It did the experiment from last edit again, this time at the exact moment Windows Explorer "freezed" a background app on the phone force closed.
Some new observations:
I pushed some TAR files to the device (as before two types: one containg large files, one containg small files) and connected to the device by using ADB shell.
Then, with the following command I extracted the archives:
Code:
tar -xf archive.tar /sdcard/Download/
'Large files' archive: no problems observed.
'Small files' archive: sporadic errors.
If I put some load on the device (starting apps, incoming phone call, ...) suddenly extracting the 'small files' archive throws a lot of errors:
Code:
tar: dummy0015.txt: can't open: No such file or directory
tar: chown 0:0 'dummy0015': No such file or directoy
tar: dummy0063.txt: can't open: No such file or directory
tar: chown 0:0 'dummy0063': No such file or directoy
tar: dummy0065.txt: can't open: No such file or directory
tar: chown 0:0 'dummy0065': No such file or directoy
[...]
Also after rebooting, for a long time extracting the 'small files' archive will throw errors. At this point certainly a lot of background processes are executed, so there is also a lot of CPU load.
So somehow all seems to be traceable back to CPU load. But why?
Heat? But it won't get any worse if I let the device heat up under a pillow and also occurs right after boot.
Electromagnetic interference? If this is the case, one would expect it to be designed badly and therefore other devices affected by it, too.
Instability related to CPU clock? Probably the device clocks up, when there is load. On the other hand: The device runs with standard clock speed and was never overclocked.
Hello,
I did some flashing and was able to narrow the problem down to Android Oreo:
First, I flashed the latest Oreo factory image (8.1.0, OPM4.171019.016.A1, May 2018). Problem persists.
Then, I went back to last Marshmallow build (6.0.1, MTC20K). No problems extracting the files.
Next, I upgraded to last Nougat build (7.1.2, N2G48C, Aug 2017). Again, it works flawlessly.
Finally, I flashed first Oreo build (8.0.0, OPR6.170623.013, Aug 2017). Problem appears again.
All flashing was done using fastboot and the flash-all batch script supplied with the factory images, I did not install or configure anything after flashing, nor did I restore a backup.
So, clearly something in Oreo is 'killing' my device. And nobody else seems to undergo this issues.
Do any of you have any idea what might be causing this or what else I could do to further narrow down the problem?

Categories

Resources