how do i debug (system ui crash, stopped) - Miscellaneous Android Development

hi everyone, i'm trying to mod some apk's (systemui and frameworkres)
i get no errors in apktool but when i flash the apk's in cwm, i get systemui has stopped and i have no ui.
i wipe cache and wipe cache partion with no help.
i'm trying to get a logcat but it's pretty much empty, one message about about heapsize.
so my question is whats the best way to find the cause of the errors?
Thanks
my logcat
Code:
--------- beginning of /dev/log/main
[ 05-12 09:25:40.243 4361: 4361 E/Trace ]
error opening trace file: No such file or directory (2)
[ 05-12 09:25:40.243 4361: 4361 D/ActivityThread ]
setTargetHeapUtilization:0.25
[ 05-12 09:25:40.243 4361: 4361 D/ActivityThread ]
setTargetHeapIdealFree:8388608
[ 05-12 09:25:40.243 4361: 4361 D/ActivityThread ]
setTargetHeapConcurrentStart:2097152

any help would be much appreciated.

Related

Replacing Sense Browser with Stock Browser

I have the "official" froyo build installed currently, and i tried replacing the HTC Sense Browser.apk with the Stock Browser.apk found in CM 6 RC3. This resulted in a force close when trying to run the app, however, the icon showed up correctly.
I'm wondering if there are tools to show what exactly is causing the force close, so i can maybe figure out a work around?
Any help would be greatly appreciated. Thanks
Twisted politiks said:
I have the "official" froyo build installed currently, and i tried replacing the HTC Sense Browser.apk with the Stock Browser.apk found in CM 6 RC3. This resulted in a force close when trying to run the app, however, the icon showed up correctly.
I'm wondering if there are tools to show what exactly is causing the force close, so i can maybe figure out a work around?
Any help would be greatly appreciated. Thanks
Click to expand...
Click to collapse
I have been wondering about this as well, I like Sense but I prefer the AOSP browser because it's faster and more tabs.
I extracted the browser and html viewer from CM6 but I get a force close after I install them. I'm guessing there is something missing. I have read about other people with the issue but no solutions yet.
The only other relevant thread I found was this one and they have the same issue.
http://forum.xda-developers.com/showthread.php?t=750527
Right now I'm looking though the apk files to see what's different but it can be anything really so I don't think I will have much luck this way.
I will try to get some logs of the crash. I'm hoping the error is something high enough level to know what's wrong.
I haven't used skyraider vanilla but I believe it's based on the sense source so that would be someone who may know what's required. Is there one place that shows all these application dependencies? I don't know if any developers document this stuff but my searches turned up nothing.
Here is the log of the crash. Ive tried every rom i could find and none have stock browser in sense but there is a sense browser in aosp rom but this isnt much help.
[ 09-23 18:07:13.905 1041:0x746 D/alogcat ]
stopping ...
[ 09-23 18:07:14.975 289:0x121 W/Settings ]
Setting location_providers_allowed has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
[ 09-23 18:07:15.015 289:0x121 W/Settings ]
Setting location_providers_allowed has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
[ 09-23 18:07:15.995 1041:0x411 D/alogcat ]
stopping ...
[ 09-23 18:07:15.995 1041:0x411 D/alogcat ]
paused
[ 09-23 18:07:16.125 1867:0x74b I/ActivityThread ]
Publishing provider browser: com.android.browser.BrowserProvider
[ 09-23 18:07:16.235 1867:0x74b I/dalvikvm ]
Could not find method android.webkit.WebView.startDnsPrefetch, referenced from method com.android.browser.BrowserActivity.onPageFinished
[ 09-23 18:07:16.235 1867:0x74b W/dalvikvm ]
VFY: unable to resolve virtual method 741: Landroid/webkit/WebView;.startDnsPrefetch ()V
[ 09-23 18:07:16.235 1867:0x74b D/dalvikvm ]
VFY: replacing opcode 0x6e at 0x002e
[ 09-23 18:07:16.235 1867:0x74b D/dalvikvm ]
VFY: dead code 0x0031-0031 in Lcom/android/browser/BrowserActivity;.onPageFinished (Landroid/webkit/WebView;Ljava/lang/StringV
[ 09-23 18:07:16.335 1867:0x74b I/dalvikvm ]
Could not find method android.webkit.WebSettings.showZoomControls, referenced from method com.android.browser.BrowserSettings$Observer.update
[ 09-23 18:07:16.335 1867:0x74b W/dalvikvm ]
VFY: unable to resolve virtual method 654: Landroid/webkit/WebSettings;.showZoomControls (Z)V
[ 09-23 18:07:16.335 1867:0x74b D/dalvikvm ]
VFY: replacing opcode 0x6e at 0x0098
[ 09-23 18:07:16.335 1867:0x74b D/dalvikvm ]
VFY: dead code 0x009b-00eb in Lcom/android/browser/BrowserSettings$Observer;.update (Ljava/util/Observable;Ljava/lang/ObjectV
[ 09-23 18:07:16.335 1867:0x74b D/AndroidRuntime ]
Shutting down VM
[ 09-23 18:07:16.335 1867:0x74b W/dalvikvm ]
threadid=1: thread exiting with uncaught exception (group=0x40025a08)
[ 09-23 18:07:18.438 1867:0x74b I/Process ]
Sending signal. PID: 1867 SIG: 9
[ 09-23 18:07:18.455 104:0x137 W/ContentService ]
binderDied() at ObserverNode name show_web_suggestions
[ 09-23 18:07:19.575 289:0x121 W/Settings ]
Setting location_providers_allowed has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
[ 09-23 18:07:19.615 289:0x121 W/Settings ]
Setting location_providers_allowed has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.
[ 09-23 18:07:20.705 1816:0x718 D/dalvikvm ]
GC_FOR_MALLOC freed 7694 objects / 604224 bytes in 74ms
[ 09-23 18:07:20.815 1041:0x75e D/alogcat ]
stopping ...
[ 09-23 18:07:20.815 1041:0x411 D/alogcat ]
resumed
[ 09-23 18:07:20.935 1816:0x718 W/IInputConnectionWrapper ]
showStatusIcon on inactive InputConnection
[ 09-23 18:07:20.965 104:0x85 I/ActivityManager ]
Displayed activity org.jtb.alogcat/.LogActivity: 249 ms (total 4959 ms)
Sent from my ADR6300 using XDA App
It seems webkit is missing settings that the stock browser wants. HTC must have modified this.
Does anyone know where android.webkit is located? I looked everywhere I could but no luck finding it. I was assuming this was in Browser.apk or HTMLViewer.apk.

a2sd no block device

Hi when i install a2sd on my Galaxy Gio then get i the follow log from a2sd check
Code:
a2sd check
[ ] GREP: Using ROM Busybox.
[ ] REBOOT: Using ROM Busybox.
[ ] FDISK: Using ROM Busybox.
[ ] CAT: Using ROM Busybox.
[ ] MKDIR: Using ROM Busybox.
[ ] RMDIR: Using ROM Busybox.
[ ] CHMOD: Using ROM Busybox.
[ ] MOUNT: Using ROM Busybox.
[ ] UMOUNT: Using ROM Busybox.
[ ] CP: Using ROM Busybox.
[ ] RM: Using ROM Busybox.
[ ] MV: Using ROM Busybox.
[ ] LN: Using ROM Busybox.
[ ] MORE: Using ROM Busybox.
[ ] MKNOD: Using ROM Busybox.
[ ] AWK: Using ROM Busybox.
[ ] SLEEP: Using ROM Busybox.
[ ] SYNC: Using ROM Busybox.
[ ] TEE: Using ROM Busybox.
__ _____
| \ |
| | |
|__/ | Darktremor Apps2SD 2.7.5.3 Beta 4a (2011-01-30)
[-] Checkpoint 1: Check for SD Card Fix and Implement.
[-] Checkpoint 2: Run Dalvik Heap Program (if exists).
[-] Checkpoint 3: Run Set Low Memory Killer Program (if exists).
[-] Checkpoint 4: Determine Mount Point.
[-] Checkpoint 5: Set Parameter Variables.
[ ] GetProp Command = /system/bin/toolbox getprop
[ ] SetProp Command = /system/bin/toolbox setprop
[ ] Mount Point = /system/sd
[-] Checkpoint 6: Insert CyanogenMod patch.
[-] Checkpoint 7: Complete Dalvik Cache Move (if applicable).
[-] Checkpoint 8: Resetting Dalvik Cache Partition
[-] Checkpoint 9: Switching Davlik Cache to Cache Partition (if applicable)
[-] Checkpoint 10: Checking for existence of command parameter
[-] Checkpoint 11: Check for a2sd help command
[-] Checkpoint 12: Check for a2sd check command
[ ] Starting Apps2SD Check Program.
Darktremor 2.7.5.3 Beta 4a Apps2SD Status Report
================================================================================
===
Legend: [Ô£ö]=Setting is correct
[ÔÇ╝]=Setting is correct, but not optimal.
[Ô£û]=Setting is incorrect and needs to be fixed or option is not availa
ble.
================================================================================
===
[COLOR="Red"]Block Device - [Ô£ö][/COLOR]
Mount Point - [Ô£ö] /system/sd
Support EXT2? - [Ô£ö] Yes
Support EXT3? - [Ô£û] No
Support EXT4? - [Ô£û] No
Apps - [ ] Regular directory.
[ ] No Apps2SD Flag File not found.
[Ô£û] Programs runs from Int. Storage.
Setup issue. Run a2sd repair to fix.
Private Apps - [ ] Regular directory.
[ ] No Apps2SD Flag File not found.
[Ô£û] Private Programs runs from Int. Storage.
Setup issue. Run a2sd repair to fix.
Dalvik Cache - [ ] Regular directory.
[ ] Dalvik to /cache flag file not found.
[ ] Dalvik to SD flag file not found.
[Ô£ö] Dalvik runs from Int. Storage.
To run from SD card, type a2sd cachesd.
To run from /cache partition, type a2sd cachepart.
Data - [ ] Program Data on Internal Storage.
Swap - [ ] Partition not present or no swap support.
[Ô£ö] Swap does not start.
ZipAlign - [Ô£ö] Not running at boot.
To activate it, type a2sd zipalign
Dalvik Heap(MB) - [Ô£ö] 64m
Low Memory
Killer Settings - [Ô£ö] 1536,2048,6144,8192,12288,15360
Note: Values are in pages.
1 page = 4KB memory.
Values represent the following:
1st number = Foreground App
2nd number = Visible App
3rd number = Secondary Server
4th number = Hidden App
5th number = Content Provider
6th number = Empty App
[Ôüç] For a list of commands that you can use with Apps2SD
Type: a2sd help
#
who knows the problem ?
does your GIO support a2sd Darktremor? to use a2sd , your boot.img must support it
zico_newbie said:
does your GIO support a2sd Darktremor? to use a2sd , your boot.img must support it
Click to expand...
Click to collapse
He makes a tut.
http://forum.xda-developers.com/showpost.php?p=16359561&postcount=302
But i get that error
strunkie said:
He makes a tut.
http://forum.xda-developers.com/showpost.php?p=16359561&postcount=302
But i get that error
Click to expand...
Click to collapse
strunkie said:
He makes a tut.
http://forum.xda-developers.com/showpost.php?p=16359561&postcount=302
But i get that error
Click to expand...
Click to collapse
Ô£ö maybe = checklist, there are word "ran a2sd to repair on your terminal after a2sd check, isnt it? , so lets write a2sd on your terminal to repair, so maybe your a2sd work but cheklist code error, lets try to move cache to ext and enable zipalign, lets read a2sd help and to move cache to ext, write a2sd cachesd on terminal and to zipalign write on terminal: a2sd zipalign
Sent from my GT-S5570 using XDA App
Sent from my GT-S5570 using XDA App

What .ko's from kernel build?

I just successfully built a kernel with my phone over nfs (wifi). I used gcc-armhf or rather to be specific, when it complained I set 'CROSS_COMPILER=/usr/bin/', cleaned, and retried. Everything seems to have went fine, and as expected I have the zImage in arch/arm/boot and the modules are scattered around, but theres a list on stdout I can use to copy them somewhere.
1.) Which kernel object files do I need?
2.) I will look at the device/samsung/d2spr/extract-files.sh file to see where I should put them, but where should I put the ones that may have been created from the config changes and are not listed?
My first couple of trys failed due to the kernel being too large, so I changed some things to modules that I think can wait to load or set up an init script. I also didn't use mkbootimg, I used abootimg, that may have been why, not too sure. I used unmkbootimg and saved the stdout to a file this time and built the kernel on my phone, still, those are some questions I still have.
Edit: Another way to ask this question...
3.) Do I need to replace the 'blobs' that I got from the official CM ROM with the ones I just built?
4.) Do the modules I built contain the proprietary code to run the hardware, or where some (wifi driver for instance) 'filled' in with 'dummy code'?
Note: The zImage built was 3699216 bytes or about 3.6 MB. The zImage I need to replace is "Kernel size 3907440" or roughly 3.9MB, things are looking good, for once! :highfive:
Just use a script to find and copy all of them
Code:
find . -iname '*.ko' -exec cp {} MODULES_OUTPUT_FOLDER_HERE \;
Run from the root folder of your kernel source
Kernel modules go in the system/lib/modules folder
They contain code to assist the kernel, it's not so much proprietary blobs like pulling libs from stock to get AOSP working but they are device and kernel specific. The entire source for each module is there...so it's not proprietary or else someone would get sued
And no, they don't get filled in with dummy code, they get built with drivers that have been adapted for the specific board and then for the specific phone model and kernel code. Modules add in what the kernel leaves out...the kernel might say "initialize wifi chip, load driver and then connect", but the main code with all the specifics of how to do that is actually stored in the wifi module (dhd.ko)
CNexus said:
Just use a script to find and copy all of them
Code:
find . -iname '*.ko' -exec cp {} MODULES_OUTPUT_FOLDER_HERE \;
Run from the root folder of your kernel source
Kernel modules go in the system/lib/modules folder
They contain code to assist the kernel, it's not so much proprietary blobs like pulling libs from stock to get AOSP working but they are device and kernel specific. The entire source for each module is there...so it's not proprietary or else someone would get sued
And no, they don't get filled in with dummy code, they get built with drivers that have been adapted for the specific board and then for the specific phone model and kernel code. Modules add in what the kernel leaves out...the kernel might say "initialize wifi chip, load driver and then connect", but the main code with all the specifics of how to do that is actually stored in the wifi module (dhd.ko)
Click to expand...
Click to collapse
Well, I hope all is not lost.
I took my last working zip I built and used an archive manager to crack it open, I replaced the zImage with the one I built on my phone. Then I replaced all .ko files that where built in system/lib/modules and closed the archive. I flashed it to my phone and installed it, now I am stuck in aboot loop and can't get to recovery.
What should I do? Can I fix it with Oden or something? That is what I used to originally root it.
Scratch that, I pulled the battery and pushed the buttons more cautiously (nervous shakes), in recovery.
What do ya think it coulda been?
I disabled paranoid networking, removed CIFS, and changed NFS to Modules instead of built-ins.
Edit: I'll try cross compiling on my lap-top, maybe had to do with the toolchain and arm abei(sp?), maybe wifi nfs is unreliable in witing to the disk?
Maybe if I use the original .ko files that I pulled from the device as per the CM extract-files.sh script, and just add the new kernel and new modules that didn't already exit?
I'll have to brute this out and hope I don't brick my phone in the process.
Kernels won't brick your phone unless it overclocks to the point where it's melting, otherwise you're good
What it sounds like is something went wrong and you had a kernel panic...or maybe the kernel didn't load at all
Check /proc/last_kmsg to see if it loaded at all
CNexus said:
Kernels won't brick your phone unless it overclocks to the point where it's melting, otherwise you're good
What it sounds like is something went wrong and you had a kernel panic...or maybe the kernel didn't load at all
Check /proc/last_kmsg to see if it loaded at all
Click to expand...
Click to collapse
My bad, as soon as I got into recovery I flashed a known working zip.
I am going to keep trying to build a custom kernel but I would like to figure out how to configure it within my source tree and let it get compiled with a rom.
but here is a cat of /proc/last_kmsg just incase it survived.
Code:
[ 0.000000] Truncating memory at 0xc0000000 to fit in 32-bit physical address space
[ 0.000000] smem_find(137, 80): wrong size 72
[ 0.023561] AXI: msm_bus_fabric_init_driver(): msm_bus_fabric_init_driver
[ 0.056035] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.056035] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.056065] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.056065] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.056065] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.056096] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.056096] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.056096] msm_rpm_get_status(): Status id 433 not defined for target
[ 0.076056] msm_gpiomux_install: write failure: -14
[ 0.076056] msm_gpiomux_install: write failure: -14
[ 0.076056] msm_gpiomux_install: write failure: -14
[ 0.076087] msm_gpiomux_install: write failure: -14
[ 0.125194] [msm8960_init_cam:1572]setting done!!
[ 0.177262] i2c i2c-14: Invalid 7-bit I2C address 0x00
[ 0.177384] i2c i2c-14: Can't create device at 0x00
[ 0.177872] i2c i2c-19: Failed to register i2c client cmc624 at 0x38 (-16)
[ 0.177964] i2c i2c-19: Can't create device at 0x38
[ 0.178483] Error-Bad Function Input
[ 0.179185] max8952 19-0060: DVS modes disabled because VID0 and VID1 do not have proper controls.
[ 0.407630] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: scm_pas
[ 0.418953] smd_channel_probe_worker: allocation table not initialized
[ 0.429757] msm_ipc_router_init: Unable to create IPC logging for IPC RTR
[ 0.430581] msm_ipc_router_ipc_log_init: Unable to create IPC logging for Req/Resp
[ 0.430856] msm_ipc_router_ipc_log_init: Unable to create IPC logging for Indications
[ 0.437082] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: acpuclk-8960
[ 0.473950] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: dtv
[ 0.477857] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: mdp
[ 0.491316] pm_runtime: fail to wake up
[ 0.991881] hdmi_msm hdmi_msm.1: external_common_state_create: sysfs group eeb42a08
[ 0.993804] Inside writeback_driver_init
[ 0.994353] Inside writeback_probe
[ 1.534289] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: rotator
[ 1.548023] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: grp3d
[ 1.558583] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: grp2d0
[ 1.568686] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: grp2d1
[ 1.602289] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: qsee
[ 1.789500] cm36651_setup_reg: initial proximity value = 0
[ 1.910697] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: usb
[ 1.930016] mms_ts 3-0048: [TSP] ISC Ver [0xbd] [0x22] [0x22]
[ 1.934777] mms_ts 3-0048: [TSP] fw is latest. Do not update.
[ 1.947077] [__s5c73m3_probe:3868] S5C73M3 probe
[ 1.950862] [s5c73m3_sensor_probe_cb:3843] Entered
[ 1.955562] [s5c73m3_i2c_probe:3725] Entered
[ 1.959896] [s5c73m3_init_client:3424] Entered
[ 1.965359] [s5c73m3_i2c_probe:3745] Exit
[ 1.968655] [s5c73m3_sensor_probe:3776] Entered
[ 1.973081] [s5c73m3_spi_init:226] Entered
[ 1.977170] [s5c73m3_spi_probe:191] Entered
[ 1.981321] [s5c73m3_spi_probe:201] s5c73m3_spi successfully probed
[ 1.987669] [s5c73m3_sensor_probe : 3799] Probe_done!!
[ 2.042698] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: msm_sdcc
[ 2.049076] couldn't get usb power supply
[ 2.057530] mmc0: No card detect facilities available
[ 2.064153] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: msm_sdcc
[ 2.081245] AXI: msm_bus_scale_register_client(): msm_bus_scale_register_client: name: msm_sdcc
[ 2.093575] aat1290a_led_probe : Probe
[ 2.378849] bam_dmux_init : unable to create IPC Logging Context
[ 2.419594] cypress_touchkey 16-0020: Touchkey FW Version: 0x06
[ 2.534594] init: invalid uid 'fm_radio'
[ 2.950068] enable_store: android_usb: already disabled
[ 2.954768] init: Unable to open persistent property directory /data/property errno: 2
[ 87.924614] SysRq : Emergency Remount R/O
[ 88.153181] Restarting system.
No errors detected
Maybe disabling Android's Paranoid Networking breaks other things?
If this wont work, maybe I will try writing a post installation script for apt-get and try to get Android to recognize the new packages nd define some permission for that .xml file I know is hiding somewhere. I might have to create a database of permissions required for all the packages in the repos (that would suck). But really, if I could just get basic Linux filesystem permissions I wouldn't need to do all of that. That whole, "only allow certain groups to create sockets" option is pulling the chair out from under me. I'll have to study the source for the filesystem a little deeper, maybe I can disable it (or at least allow root) from the source without taking it out of the kernel config.
For instance, postgresql needs to open a socket and bind to a port, it tries ipv4 an ipv6 AF_INET and AF_INET6, and this paranoid feature will check the processes gid as well as other permissions I think to see if it can. So I tried setting the gid bit to run /etc/init.d/postrgresql as gid AID_INET but it still fails, probably because the file is not listed in that .xml file I mentioned earlier. I think a post installation script might work best if I can't turn the feature off or fix it to be more permissive.
I think the packing have some issue.. Go into my github check moto_tool their u can see unpack repack txt file open it. Change the value as per you phone and you are done

[SOLVED] Bootloop/kernel panic in meminfo_proc_show() 3.10.65+ trying to port LOS12.1

Hello Android kernel hackers,
I am trying to port the current ASB-patched LOS12.1 (github "cm12-amami") to a Teclast 98 (M1E9) tablet for which kernel sources are missing. My build completes fine, however, I run into a boot loop due to kernel panic with an (at least for me) totally unhelpful stack trace:
During init.rc processing, the kernel panics on logd startup when logd tries to read from /proc/meminfo with the following stack trace:
Code:
[ 126.200788]00:02:29.656321 openat(AT_FDCWD, "/proc/meminfo", O_RDONLY) = 4
[ 126.200956]00:02:29.656496 fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
[ 126.201077]00:02:29.656614 mprotect(0x7faf52b000, 4096, PROT_READ|PROT_WRITE) = 0
[ 126.201187]00:02:29.656726 mprotect(0x7faf52b000, 4096, PROT_READ) = 0
[ 126.202709]00:02:29.656833 read(4,
* KERNEL PANIC HAPPENS HERE!!! *
Code:
[ 126.202739]<1> (1)[949:logd]<1>start....
[ 126.202805]<1> (1)[949:logd]Unable to handle kernel NULL pointer dereference at virtual address 00000016
[ 126.202817]<1> (1)[949:logd]pgd = ffffffc070dee000
[ 126.202828]<1> (1)[949:logd][00000016] *pgd=0000000000000000 (1)[949:logd]
[ 126.202846]<1> (1)[949:logd][KERN Warning] ERROR/WARN forces debug_lock off!
[ 126.202854]<1> (1)[949:logd][KERN Warning] check backtrace:
[ 126.202868]<1> (1)[949:logd]CPU: 1 PID: 949 Comm: logd Tainted: G W 3.10.65+ #1
[ 126.202878]<1> (1)[949:logd]Call trace:
[ 126.202899]<1> (1)[949:logd][<ffffffc000088f50>] dump_backtrace+0x0/0x16c
[ 126.202913]<1> (1)[949:logd][<ffffffc0000890cc>] show_stack+0x10/0x1c
[ 126.202931]<1> (1)[949:logd][<ffffffc0009a69a0>] dump_stack+0x1c/0x28
[ 126.202947]<1> (1)[949:logd][<ffffffc0002f7210>] debug_locks_off+0x40/0x5c
[ 126.202960]<1> (1)[949:logd][<ffffffc00009a260>] oops_enter+0xc/0x28
[ 126.202974]<1> (1)[949:logd][<ffffffc000089100>] die+0x28/0x1d8
[ 126.202989]<1> (1)[949:logd][<ffffffc0009a49ec>] __do_kernel_fault.part.5+0x70/0x84
[ 126.203003]<1> (1)[949:logd][<ffffffc000094260>] do_page_fault+0x348/0x34c
[ 126.203017]<1> (1)[949:logd][<ffffffc000094350>] do_translation_fault+0x40/0x4c
[ 126.203030]<1> (1)[949:logd][<ffffffc0000813fc>] do_mem_abort+0x38/0x98
which does not seem to uncover the root cause, but rather the root cause stack trace seems to be:
Code:
[ 133.341226]<1>-(1)[949:logd]Call trace:
[ 133.341239]<1>-(1)[949:logd][<ffffffc0001f37d8>] meminfo_proc_show+0x50/0x3c4
[ 133.341255]<1>-(1)[949:logd][<ffffffc0001aefb8>] seq_read+0x1a4/0x40c
[ 133.341271]<1>-(1)[949:logd][<ffffffc0001ebeec>] proc_reg_read+0x4c/0x7c
[ 133.341285]<1>-(1)[949:logd][<ffffffc00018e75c>] vfs_read+0x88/0x170
[ 133.341298]<1>-(1)[949:logd][<ffffffc00018ebf0>] SyS_read+0x40/0x8c
[ 133.341310]<1>-(1)[949:logd]Code: 52800001 91326000 97fe67c1 aa0003f3 (f9400c00)
[ 133.341322]<1>-(1)[949:logd]---[ end trace 1b75b31a2719ed20 ]---
[ 133.341332]<1>-(1)[949:logd]Kernel panic - not syncing: Fatal exception
[ 133.341423]<1>-(1)[949:logd]mrdump: cpu[1] tsk:ffffffc073a3e000 ti:ffffffc070e64000
[ 134.241428]<1>-(1)[949:logd]
Most interestingly, the exact same kernel blob can successfully boot stock Android 5.1 and successfully read from /proc/meminfo when booted from stock boot.img while it crashes with my LOS12.1 build boot.img.
bootimg.cfg (using abootimg) is identical in both cases (except the boot size):
Code:
bootsize = 0x780000
pagesize = 0x800
kerneladdr = 0x40080000
ramdiskaddr = 0x44000000
secondaddr = 0x40f00000
tagsaddr = 0x4e000000
name = 1513588375
cmdline = bootopt=64S3,32N2,64N2 androidboot.selinux=permissive
Thanks a million in advance for any ideas or pointers about what might be going wrong with this stock kernel blob and my LOS12.1 build with regards to meminfo_proc_show()! :highfive:
awl14
Issue resolved!
Finally resolved by making changes (a whole number of, so I haven't tracked it down to one particular change) to my CM12.1 build's system partition, making it resemble the stock image more closely.
I still don't have any clues why the kernel would crash on reading from /proc/meminfo due to "wrong"/buggy contents in the system partition (/system file system), but as the issue is resolved, this can be regarded as a proof that such content in system can indeed matter in a critical way for the behaviour of the kernel...
My custom ROM for Teclast 98 (M1E9) runs fine now, I will publish a download link soon on xda.
Panic caused by kernel reading file /system/bin/cpuinfo
I encountered the same issue and was able to find the root cause. The kernel I'm dealing with has been modified by Chinese crooks who fake the amount of memory in the device by intercepting meminfo_proc_show(). In this routine, they read the file /system/bin/cpuinfo, apparently extracting the value to be shown to the user as the memory size from that file. The code does not even test the return code from the file opening routine, and simply crashes the kernel if the file is not present.

[CLOSED] Flash fails due signature error

Hello all,
im trying to flash magisk to my android device. Therefore i only have the update function from the manufacturer inside the settings menu and wireless adb access with full root priveleges. No fastboot, no USB debug.
What i´ve tried yet: patching the boot.img from original update.zip on the device with magisk app. Than repack and sign with SignApkv2.jar and the testkeys. The device loads the update.zip and boot into recovery but than the update fails.
This is the log from the failed update:
Spoiler: Log
[ 0.401828] Verifying update package...
[ 0.424111] I:comment is 1840 bytes; signature is 1720 bytes from end
[ 9.515415] I:signature (offset: 71e19400, length: 6b2): 308206ae06092a864886f70d010702a082069f3082069b020101310b300906052b0e03021a0500300b06092a864886f70d010701a08204ac308204a830820390a003020102020900936eacbe07f201df300d06092a864886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3038303232393031333334365a170d3335303731373031333334365a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100d6931904dec60b24b1edc762e0d9d8253e3ecd6ceb1de2ff068ca8e8bca8cd6bd3786ea70aa76ce60ebb0f993559ffd93e77a943e7e83d4b64b8e4fea2d3e656f1e267a81bbfb230b578c20443be4c7218b846f5211586f038a14e89c2be387f8ebecf8fcac3da1ee330c9ea93d0a7c3dc4af350220d50080732e0809717ee6a053359e6a694ec2cb3f284a0a466c87a94d83b31093a67372e2f6412c06e6d42f15818dffe0381cc0cd444da6cddc3b82458194801b32564134fbfde98c9287748dbf5676a540d8154c8bbca07b9e247553311c46b9af76fdeeccc8e69e7c8a2d08e782620943f99727d3c04fe72991d99df9bae38a0b2177fa31d5b6afee91f020103a381fc3081f9301d0603551d0e04160414485900563d272c46ae118605a47419ac09ca8c113081c90603551d230481c13081be8014485900563d272c46ae118605a47419ac09ca8c11a1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900936eacbe07f201df300c0603551d13040530030101ff300d06092a864886f70d010105050003820101007aaf968ceb50c441055118d0daabaf015b8a765a27a715a2c2b44f221415ffdace03095abfa42df70708726c2069e5c36eddae0400be29452c084bc27eb6a17eac9dbe182c204eb15311f455d824b656dbe4dc2240912d7586fe88951d01a8feb5ae5a4260535df83431052422468c36e22c2a5ef994d61dd7306ae4c9f6951ba3c12f1d1914ddc61f1a62da2df827f603fea5603b2c540dbd7c019c36bab29a4271c117df523cdbc5f3817a49e0efa60cbd7f74177e7a4f193d43f4220772666e4c4d83e1bd5a86087cf34f2dec21e245ca6c2bb016e683638050d2c430eea7c26a1c49d3760a58ab7f1a82cc938b4831384324bd0401fa12163a50570e684d318201ca308201c60201013081a2308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d020900936eacbe07f201df300906052b0e03021a0500300d06092a864886f70d01010105000482010099e456c0ecdb178abe470462040e5c0752f6fba4d888dcd95ab39b3a72c3a42d7627824d4ffea8830c3ad32c2739cb485826c4dbb4072c13013c23f05a2d3c5e213336be8e72eb33f452a3a96f7af9fa7233bc92af0bc2d5b9d521661d509c0e693e603cbdac5e58c00a01a27e05bdb6cec80fc9a8ce3de22ae1104f6308be8e06f7f9f00133c2738d8c268983da3b33c13efcd163aceb53656826f0b87b58059c0a383cb1651e00d4e90b354429789fbfbfc80f1824b90d249f0dc308f5f841a53d8d9b28b84712c4a4c0bffe2f40c111f237f1dddd0ac52f13178fc65c357cc4c8b033c3d44dffbf906d37cb827053017b99ffb696f15f8afd6e9519129cbf
[ 9.515704] I:failed to verify against RSA key 0
[ 9.515721] I:SHA-256 digest: 0af57a569628abf43e0cb2ba4316da9a0fb47150217255413d0574d3a10dafc6
[ 9.515729] E:failed to verify whole-file signature
[ 9.535726] Update package verification took 9.1 s (result 1).
[ 9.563312] E:Signature verification failed
[ 9.577467] E:error: 21
This is the log from a succesful update with the original update.zip:
Spoiler: Log
[ 0.350442] Finding update package...
[ 0.393154] I:Update location: @/cache/recovery/block.map
[ 0.393354] Opening update package...
[ 0.413638] I:mmapped 2 ranges
[ 0.414972] I:1 key(s) loaded from /system/etc/security/otacerts.zip
[ 0.414988] Verifying update package...
[ 0.436744] I:comment is 1578 bytes; signature is 1560 bytes from end
[ 9.442515] I:signature (offset: 71e1be37, length: 612): 3082060e06092a864886f70d010702a08205ff308205fb020101310f300d06096086480165030402010500300b06092a864886f70d010701a0820403308203ff308202e7a003020102020900e98c7b3de8706cb3300d06092a864886f70d01010b0500308195310b300906035504061302434e3112301006035504080c094775616e67446f6e673116301406035504070c0d5368656e5a68656e2056696577310b3009060355040a0c0251463111300f060355040b0c0852657365617263683114301206035504030c0b6c69756875616c69616e673124302206092a864886f70d01090116157169616e66656e67407169616e66656e672e636f6d301e170d3232303130383038333635325a170d3439303532363038333635325a308195310b300906035504061302434e3112301006035504080c094775616e67446f6e673116301406035504070c0d5368656e5a68656e2056696577310b3009060355040a0c0251463111300f060355040b0c0852657365617263683114301206035504030c0b6c69756875616c69616e673124302206092a864886f70d01090116157169616e66656e67407169616e66656e672e636f6d30820122300d06092a864886f70d01010105000382010f003082010a0282010100b29877a044433c5e55eef1d900b4ff257e7fc54ab7a4c7914837af0765f35c3db4f8de39831b9c76304f365f4537f5aec31f3ccf83f8744bcfcf9be4c40fe92e36edf4a0d50799e07cd3a3dfb17ce13e970de7b2d57aa1a5bc4109fe800c3f97976e077387a99cfa57a0f0252fa0fa4ef5203e098dbaf600fa5ded6e35eba8c2150ad858daf29dda5064ca881d46a2a20492258c4f20d26615f618aa334404a5198c4440292f751553eceb7cb3f0b4b7e4ddba4891f0ebfc1a7894f692300d1575ef4367f8508a24e72b6aaccd0dea8dbefb54e2b48658f939988a8bf117e3fa12d18971d48c8bcad9f80aa215602bd8dfc53946e320e32dbef09fe278a9bdbd0203010001a350304e301d0603551d0e04160414d9c898e436cc674380bf1eb3325629d87cd4eb81301f0603551d23041830168014d9c898e436cc674380bf1eb3325629d87cd4eb81300c0603551d13040530030101ff300d06092a864886f70d01010b0500038201010036bcd486a789ae6ab4d7166e50cfadcdcf6a0232e329f0b5117bda3f4ebd1b8e6d3fa7f37f7e25cdc830816b95b05b59f47c4db469af6741c0081e21f0033f74869bb2a34cac9364942cb8f7b0759f9b007aed92a655eb00fb1ba0bfa3ed663d80346417a4a96f56068d972e07fba6daee389bdbab0e46b88e9026eddce3c50dfb8f47a2f0604ebb4d0f8abe67673476303e3a4693a0db5ca1081c8c1179330cca5b01c7be0fd431bfa292ca9b6e1f56e6eea8a4aba1d43c71973b43bb82d9bff36d38413a45ae731286ba02aabe14cf5c0437b155b287d1623045df6cef6652347a252af4719b50da4b3d11ab7241c2a4b876043158c159271b5322c5a5eef9318201cf308201cb0201013081a3308195310b300906035504061302434e3112301006035504080c094775616e67446f6e673116301406035504070c0d5368656e5a68656e2056696577310b3009060355040a0c0251463111300f060355040b0c0852657365617263683114301206035504030c0b6c69756875616c69616e673124302206092a864886f70d01090116157169616e66656e67407169616e66656e672e636f6d020900e98c7b3de8706cb3300d06096086480165030402010500300d06092a864886f70d010101050004820100339e68dcbca8358da77d66f3431891c68e0600dbf95f0f609b7c3c1de7df356103c9fb3b1cda8596bd247339cef1c51abc912189bd662f8b79cfc46933b388f5a8d3e3216a89acd7cc09a9b5567547027eb7c75e63216ea4a9b1a72acdac49ca52c11461016ec275a551cda67944cb6de3d5274fccd33f21794181a22bfb1d58cc603f61603e416c9da99b8aae015d9747ee3a9265709e5236601ff0bd981cefb03f538ace162e10721d1bfbc2716c94b28e2f42b0ef9472f188929c7b4fa8625e7b1a4df35d267b6706f62d66ec0d55a2b7db8049065871720ba4ff0d98d829c09ecac2d4533d187f22f4523bddddf344f4524e1c57f447f44516c1d4a8b00d
[ 9.442825] I:whole-file signature verified against RSA key 0
[ 9.442863] Update package verification took 9.0 s (result 0).
[ 9.448867] I:Verifying package compatibility...
[ 9.466881] Installing update...
I also replaced the releasekey.x509.pem inside /system/etc/security/otacerts.zip with the testkey certificat from the signapkv2 folder. But that did not work too.
Any ideas how i can update my device with the modified update.zip?
Cheers
blue_one
Thread closed!
[Read Before Posting]QUESTIONS DO NOT BELONG IN GENERAL
Hello Everybody, In order to attempt to keep this forum neat and tidy the moderation team is asking you to post your questions into the Questions and Answers (Q&A) forum and not into the General section. You can find the Q&A forum by clicking...
forum.xda-developers.com

Categories

Resources