Hi Guys,
Trying to build 7.1 AOSP for Z5 Premium and keep running in to this, anyone have any idea what it means or how to fix it?
Code:
[ 65% 31667/48245] target thumb C++: l...venc/src/video_encoder_device_v4l2.cpp
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/inc -I hardware/qcom/media/msm8974/mm-video-v4l2/vidc/../vidc/common/inc -I hardware/qcom/media/msm8974/mm-core/inc -I hardware/qcom/media/msm8974/libstagefrighthw -I out/target/product/satsuki/obj/include/qcom/display -I out/target/product/satsuki/obj/include/adreno -I frameworks/native/include/media/hardware -I frameworks/native/include/media/openmax -I hardware/qcom/media/msm8974/libc2dcolorconvert -I frameworks/av/include/media/stagefright -I frameworks/av/include/media/hardware -I hardware/qcom/media/msm8974/mm-video-v4l2/vidc -I out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates -I out/target/product/satsuki/gen/SHARED_LIBRARIES/libOmxVenc_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem out/target/product/satsuki/obj/include -isystem device/sony/common-headers/kernel-headers -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libm/include -isystem bionic/libm/include/arm -c -fno-exceptions -Wno-multichar -msoft-float -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a7 -D__ARM_FEATURE_LPAE=1 -mfloat-abi=softfp -mfpu=neon -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc -target arm-linux-androideabi -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -fvisibility-inlines-hidden -Wsign-promo -Wno-inconsistent-missing-override -nostdlibinc -target arm-linux-androideabi -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -g -O3 -Dlrintf=_ffix_r -D__align=__alignx -D__alignx\\(x\\)=__attribute__\\(\\(__aligned__\\(x\\)\\)\\) -DT_ARM -Dinline=__inline -D_ANDROID_ -UENABLE_DEBUG_LOW -DENABLE_DEBUG_HIGH -DENABLE_DEBUG_ERROR -UINPUT_BUFFER_LOG -UOUTPUT_BUFFER_LOG -USINGLE_ENCODER_INSTANCE -DMAX_RES_1080P -DMAX_RES_1080P_EBI -D_MSM8974_ -DUSE_ION -D_ANDROID_ICS_ -fPIC -D_USING_LIBCXX -std=gnu++14 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d -o out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.o hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp ) && (cp out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d >> out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.P; rm -f out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d )"
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:412:33: error: use of undeclared identifier 'V4L2_EVENT_MSM_VIDC_CLOSE_DONE'
if (dqevent.type == V4L2_EVENT_MSM_VIDC_CLOSE_DONE) {
^
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:459:5: error: use of undeclared identifier 'V4L2_EVENT_MSM_VIDC_CLOSE_DONE'
V4L2_EVENT_MSM_VIDC_CLOSE_DONE,
^
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:467:26: error: invalid application of 'sizeof' to an incomplete type 'const int []'
int array_sz = sizeof(event_type)/sizeof(int);
^~~~~~~~~~~~
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:1072:26: error: invalid application of 'sizeof' to an incomplete type 'const int []'
int array_sz = sizeof(event_type)/sizeof(int);
^~~~~~~~~~~~
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:2771:67: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat]
DEBUG_PRINT_ERROR("Failed setting color format in in etb %x", m_sVenc_cfg.inputformat);
~~ ^~~~~~~~~~~~~~~~~~~~~~~
%lx
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/../vidc/common/inc/vidc_debug.h:48:23: note: expanded from macro 'DEBUG_PRINT_ERROR'
ALOGE(fmt,##args)
^~~~
system/core/include/log/log.h:156:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
^~~~~~~~~~~
system/core/include/log/log.h:453:38: note: expanded from macro 'ALOG'
LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
^~~~~~~~~~~
system/core/include/log/log.h:461:37: note: expanded from macro 'LOG_PRI'
android_printLog(priority, tag, __VA_ARGS__)
^~~~~~~~~~~
system/core/include/log/log.h:618:36: note: expanded from macro 'android_printLog'
__android_log_print(prio, tag, fmt)
^~~
1 warning and 4 errors generated.
[ 65% 31667/48245] target Package: fra...amework-res_intermediates/package.apk)
warning: string 'gsm_alphabet_default_charset' has no default translation.
warning: string 'gsm_alphabet_default_charset' is missing 90 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: string 'wfcSpnFormat' has no default translation.
warning: string 'wfcSpnFormat' is missing 41 required localizations: az_AZ be_BY bn_BD bs_BA en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU et_EE eu_ES gl_ES gu_IN hy_AM is_IS ka_GE kk_KZ km_KH kn_IN ky_KG lo_LA mk_MK ml_IN mn_MN mr_IN ms_MY my_MM ne_NP pa_IN si_LK sq_AL ta_IN te_IN ur_PK uz_UZ zh_CN zh_HK zh_TW
warning: no entries written for dimen/password_keyboard_height (0x010500c3)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (01:50:50 (hh:mm:ss)) ####
Thanks.
7.1 hasn't gotten the kernel source ready yet.
Also you're building with O3? That's bound to break things.
Related
For some reason when i flash xposed framework and reboot, my phone will boot till the boot animation and turn to a black screen halfway, and then the only way is to press power button which will make the phone vibrate, and i need to keep pressing until the phone stops vibrating when i press the power button, than it will go to my lock screen and everything is normal except that xposed is no working. and i have no idea why
how do i get a log for what is happening during boot to prevent xposed from working for my phone?
/system/bin/sh : sh
D/libsuperuser( 9334): [libsuperuser][O][SU-] -BOC-
D/libsuperuser( 9334): [libsuperuser][O][SU-] uid=0(root) gid=0(root) context=u:
r:init_shell:s0
D/libsuperuser( 9334): [libsuperuser][O][SU*] 1500e016-94cd-4086-9a81-05512b836a
52-00000001
D/libsuperuser( 9334): [libsuperuser][O][SU-] 1500e016-94cd-4086-9a81-05512b836a
52-00000001 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed mount -o remount,rw /system
D/libsuperuser( 9334): [libsuperuser][O][SU-] 541b4208-dad3-4691-9d8b-4a26c396cd
e8-00000002 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] 541b4208-dad3-4691-9d8b-4a26c396cd
e8-00000002
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed cp -a /system/bin/app_process /system/bin/app_pro
cess.orig
D/libsuperuser( 9334): [libsuperuser][O][SU*] c3de7cbe-c70d-4b79-9735-5c7270c5f7
0a-00000003
D/libsuperuser( 9334): [libsuperuser][O][SU-] c3de7cbe-c70d-4b79-9735-5c7270c5f7
0a-00000003 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed sync
D/libsuperuser( 9334): [libsuperuser][O][SU-] b15e5de8-9b25-4948-939e-9850a7ed67
83-00000004 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] b15e5de8-9b25-4948-939e-9850a7ed67
83-00000004
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed cp -a /data/data/de.robv.android.xposed.installer
/bin/app_process /system/bin/app_process
D/libsuperuser( 9334): [libsuperuser][O][SU-] 0fccd2f5-558f-4f67-8623-2efbc262a4
bb-00000005 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] 0fccd2f5-558f-4f67-8623-2efbc262a4
bb-00000005
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed chmod 755 /system/bin/app_process
D/libsuperuser( 9334): [libsuperuser][O][SU-] f0e4937e-0fe9-4c70-a42e-15b1549061
db-00000006 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] f0e4937e-0fe9-4c70-a42e-15b1549061
db-00000006
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed chown root:shell /system/bin/app_process
D/libsuperuser( 9334): [libsuperuser][O][SU*] df222303-06bc-4e56-bc3e-eab809a464
5b-00000007
D/libsuperuser( 9334): [libsuperuser][O][SU-] df222303-06bc-4e56-bc3e-eab809a464
5b-00000007 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed rm /data/data/de.robv.android.xposed.installer/co
nf/disabled
D/libsuperuser( 9334): [libsuperuser][O][SU*] cdddb043-2a85-4d32-a894-f6a4a74771
14-00000008
D/libsuperuser( 9334): [libsuperuser][O][SU-] cdddb043-2a85-4d32-a894-f6a4a74771
14-00000008 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed sync
D/libsuperuser( 9334): [libsuperuser][O][SU-] c12921c3-3d1c-44cc-8145-46e800647b
38-00000009 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] c12921c3-3d1c-44cc-8145-46e800647b
38-00000009
I/XposedInstaller( 9334): updating modules.list
I/SFPerfTracer( 263): triggers: (rate: 11:424) (compose: 0:7) (post: 0:1)
(render: 0:17) (12:3906 frames) (13:7349)
D/SFPerfTracer( 263): layers: (5:11) (DimLayer: 0:2)* (FocusedStackFrame
: 0:55)* (StatusBar: 0:1161) (NavigationBar: 0:356) (com.go.multiplewallpaper.Mu
ltipleWallpaperService: 0:82)* (DimLayer: 13:101) (de.robv.android.xposed.instal
ler/de.robv.android.xposed.installer.WelcomeActivity: 0:111)* (de.robv.android.x
posed.installer/de.robv.android.xposed.installer.XposedInstallerActivity: 0:70)
(de.robv.android.xposed.installer/de.robv.android.xposed.installer.XposedInstall
erActivity: 13:18)
W/linker ( 9743): /system/bin/app_process has text relocations. This is wasting
memory and is a security risk. Please fix.
D/AndroidRuntime( 9743):
D/AndroidRuntime( 9743): >>>>>> AndroidRuntime START com.android.internal.os.Run
timeInit <<<<<<
D/AndroidRuntime( 9743): CheckJNI is OFF
D/dalvikvm( 9743): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 9743): Added shared lib libjavacore.so 0x0
D/dalvikvm( 9743): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 9743): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 9743): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 9743): Note: class Landroid/app/ActivityManagerNative; has 181 unimp
lemented (abstract) methods
W/SurfaceFlinger( 263): couldn't log to binary event log: overflow.
E/memtrack( 9743): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 9743): failed to load memtrack module: -2
D/AndroidRuntime( 9743): Calling main entry com.android.commands.am.Am
I/ActivityManager( 1027): Start proc com.koushikdutta.superuser for broadcast co
m.koushikdutta.superuser/.SuReceiver: pid=9790 uid=10102 gids={50102}
D/AndroidRuntime( 9743): Shutting down VM
D/dalvikvm( 9743): GC_CONCURRENT freed 97K, 14% free 609K/708K, paused 1ms+0ms,
total 3ms
I/SFPerfTracer( 263): triggers: (rate: 11:425) (compose: 0:7) (post: 0:1)
(render: 0:19) (43:3964 frames) (44:7419)
D/SFPerfTracer( 263): layers: (6:12) (DimLayer: 0:2)* (FocusedStackFrame
: 0:58)* (StatusBar: 0:1161) (NavigationBar: 0:356) (com.go.multiplewallpaper.Mu
ltipleWallpaperService: 0:82)* (DimLayer: 0:121) (de.robv.android.xposed.install
er/de.robv.android.xposed.installer.XposedInstallerActivity: 0:71) (de.robv.andr
oid.xposed.installer/de.robv.android.xposed.installer.XposedInstallerActivity: 0
:30)* (de.robv.android.xposed.installer/de.robv.android.xposed.installer.XposedI
nstallerActivity: 17:36) (Toast: 30:33)
I/ActivityManager( 1027): Killing 9491:com.android.settings/1000 (adj 15): empty
#9
W/ContextImpl( 1331): Calling a method in the system process without a qualified
user: android.app.ContextImpl.sendBroadcast:1252 android.content.ContextWrapper
.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:
76 com.motorola.motocare.internal.frameworkevents.ProcessKillTrigger.sendTrigger
:147 com.motorola.motocare.internal.frameworkevents.ProcessKillTrigger.handleFra
meworkEvent:164
I/SFPerfTracer( 263): triggers: (rate: 0:0) (995 sw vsyncs) (0 skipped) (4
4:7269 vsyncs) (46:11890)
D/WifiService( 1027): Client connection lost with reason: 4
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed reboot
E/qdhwcomposer( 263): hwc_sync: ioctl MSMFB_BUFFER_SYNC failed, err=Operation n
ot permitted
E/qdhwcomposer( 263): hwc_sync: acq_fen_fd_cnt=1 flags=0 fd=16 dpy=0 numHwLayer
s=6
E/qdoverlay( 263): Failed to call ioctl MSMFB_OVERLAY_PLAY err=Operation not pe
rmitted
E/qdoverlay( 263): MdpData failed to play
E/qdoverlay( 263): == Dump MdpData start ==
E/qdoverlay( 263): == Dump OvFD fd=63 path=/dev/graphics/fb0 start/end ==
E/qdoverlay( 263): mOvData msmfb_overlay_data id=8
E/qdoverlay( 263): data msmfb_data offset=0 memid=27 id=0 flags=0x0 priv=0
E/qdoverlay( 263): == Dump MdpData end ==
E/qdhwcomposer( 263): draw: queueBuffer failed for FBUpdate
E/qdhwcomposer( 263): hwc_set_primary: FBUpdate draw failed
E/qdoverlay( 263): Failed to call ioctl MSMFB_DISPLAY_COMMIT err=Operation not
permitted
E/qdoverlay( 263): static bool overlay:verlay::displayCommit(const int&, cons
t overlay::utils:im&): commit failed
E/qdhwcomposer( 263): hwc_set_primary: display commit fail for 0 dpy!
E/qdoverlay( 263): Failed to call ioctl MSMFB_OVERLAY_SET err=Operation not per
mitted
E/qdoverlay( 263): MdpCtrl failed to setOverlay
E/qdoverlay( 263): == Bad OVInfo is: mdp_overlay z=0 fg=0 alpha=255 mask=-1 fl
ags=0x20000 id=8
E/qdoverlay( 263): src msmfb_img w=736 h=1280 format=13 MDP_RGBA_8888
E/qdoverlay( 263): src_rect mdp_rect x=0 y=0 w=720 h=1280
E/qdoverlay( 263): dst_rect mdp_rect x=0 y=0 w=720 h=1280
E/qdoverlay( 263): Ctrl commit failed set overlay
E/qdhwcomposer( 263): configure: configMdp failed for dpy 0
E/qdoverlay( 263): Failed to call ioctl MSMFB_OVERLAY_UNSET err=Operation not p
ermitted
E/qdoverlay( 263): MdpCtrl close error in unset
Are you running ART or Dalvik? Xposed will not currently work with ART.
SbM_ said:
Are you running ART or Dalvik? Xposed will not currently work with ART.
Click to expand...
Click to collapse
im using davlik
Xposed automatically switch your system to Dalvik.
Flash the Xposed-recovery that you have on your SD-Card via Custom Recovery.
Then reboot, remove all the Xposed settings/apk/etc. - reboot and reinstall Xposed.
*also be sure you have busybox and supersu installed.
darkeingel said:
Xposed automatically switch your system to Dalvik.
Flash the Xposed-recovery that you have on your SD-Card via Custom Recovery.
Then reboot, remove all the Xposed settings/apk/etc. - reboot and reinstall Xposed.
*also be sure you have busybox and supersu installed.
Click to expand...
Click to collapse
i never change to art at all, it was working fine till i restarted my phone
You FLASH Xposed?
edisso10018 said:
You FLASH Xposed?
Click to expand...
Click to collapse
i install the app and install the framework from there?
darkeingel said:
Xposed automatically switch your system to Dalvik.
Flash the Xposed-recovery that you have on your SD-Card via Custom Recovery.
Then reboot, remove all the Xposed settings/apk/etc. - reboot and reinstall Xposed.
*also be sure you have busybox and supersu installed.
Click to expand...
Click to collapse
i tried uninstalling the apks for xposed and other xposed related apks and reinstall, but its not working
Hi,
I tried to build my own rom with the tutorial for the 1+1 of cynogenmod.
The first built was fine, so I wanted to change the toolchain for compiling the new built with SABERMOD.
This is what I done so far :
- git clone -b master https://github.com/SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-linux-androideabi-4.9 prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-SM-4.9
- built/envsetup.sh =
Code:
export ANDROID_TOOLCHAIN_2ND_ARCH=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-SM-4.9/bin
;;
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
;;
mips|mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
Code:
unset ANDROID_KERNEL_TOOLCHAIN_PATH
case $ARCH in
arm)
# Legacy toolchain configuration used for ARM kernel compilation
toolchaindir=arm/arm-eabi-SM-4.9/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
fi
;;
- repo sync and other "pre-steps"
-brunch bacon
After 45 minutes I was getting this error:
Code:
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/root/android/system/kernel/oneplus/msm8974'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
warning: unknown warning option '-Wno-unused-local-typedef' [-Wunknown-warning-option]
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:166:21: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
for (int i = 0; i < parts.size() - 1; i++) {
~ ^ ~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:533:25: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < data_.size(); i++) {
~ ^ ~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:615:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < proto_path_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:633:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < input_files_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:655:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < output_directives_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:745:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < input_files_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:925:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parts.size(); i++) {
~ ^ ~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1209:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1238:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1371:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1377:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
12 warnings generated.
warning: unknown warning option '-Wno-unused-local-typedef' [-Wunknown-warning-option]
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/plugin.cc:136:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
2 warnings generated.
#### make failed to build some targets (45:19 (mm:ss)) ####
Looks like an kernel compiling error, but I dont know how to fix it .
Maybe someone can help me out of this.
n00del said:
Hi,
I tried to build my own rom with the tutorial for the 1+1 of cynogenmod.
The first built was fine, so I wanted to change the toolchain for compiling the new built with SABERMOD.
This is what I done so far :
- git clone -b master https://github.com/SaberMod/android_prebuilts_gcc_linux-x86_arm_sabermod-arm-linux-androideabi-4.9 prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-SM-4.9
- built/envsetup.sh =
Code:
export ANDROID_TOOLCHAIN_2ND_ARCH=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-SM-4.9/bin
;;
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
;;
mips|mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
Code:
unset ANDROID_KERNEL_TOOLCHAIN_PATH
case $ARCH in
arm)
# Legacy toolchain configuration used for ARM kernel compilation
toolchaindir=arm/arm-eabi-SM-4.9/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ANDROID_KERNEL_TOOLCHAIN_PATH="$ARM_EABI_TOOLCHAIN":
fi
;;
- repo sync and other "pre-steps"
-brunch bacon
After 45 minutes I was getting this error:
Code:
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/root/android/system/kernel/oneplus/msm8974'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
warning: unknown warning option '-Wno-unused-local-typedef' [-Wunknown-warning-option]
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:166:21: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
for (int i = 0; i < parts.size() - 1; i++) {
~ ^ ~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:533:25: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < data_.size(); i++) {
~ ^ ~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:615:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < proto_path_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:633:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < input_files_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:655:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < output_directives_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:745:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < input_files_.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:925:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parts.size(); i++) {
~ ^ ~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1209:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1238:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1371:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc:1377:23: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
12 warnings generated.
warning: unknown warning option '-Wno-unused-local-typedef' [-Wunknown-warning-option]
external/chromium_org/third_party/protobuf/src/google/protobuf/compiler/plugin.cc:136:21: warning: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned int') [-Wsign-compare]
for (int i = 0; i < parsed_files.size(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~~~
2 warnings generated.
#### make failed to build some targets (45:19 (mm:ss)) ####
Looks like an kernel compiling error, but I dont know how to fix it .
Maybe someone can help me out of this.
Click to expand...
Click to collapse
Try another toolchain for the right CPU for you ..its solved your Problem ?
Have you setup the toolchain for the kernel correctly before you Start the compile?
Hey Guys,
I need a little help with just understanding what this error is, I'm trying to build AOSP 7.1 for a Sony E6853 and keep running in to it.
I haven't posed in the device specific forum as there's a lack of activity in there and this doesn't seem to be a device specific error but it is in the wrong place then please let me know.
The guide I'm following is here: http://developer.sonymobile.com/open-devices/aosp-build-instructions/how-to-build-aosp-nougat-for-unlocked-xperia-devices/
Any help would be greatly appreciated, I'm a .net developer so building Android is pretty new to me .
Code:
[ 65% 31667/48245] target thumb C++: l...venc/src/video_encoder_device_v4l2.cpp
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/inc -I hardware/qcom/media/msm8974/mm-video-v4l2/vidc/../vidc/common/inc -I hardware/qcom/media/msm8974/mm-core/inc -I hardware/qcom/media/msm8974/libstagefrighthw -I out/target/product/satsuki/obj/include/qcom/display -I out/target/product/satsuki/obj/include/adreno -I frameworks/native/include/media/hardware -I frameworks/native/include/media/openmax -I hardware/qcom/media/msm8974/libc2dcolorconvert -I frameworks/av/include/media/stagefright -I frameworks/av/include/media/hardware -I hardware/qcom/media/msm8974/mm-video-v4l2/vidc -I out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates -I out/target/product/satsuki/gen/SHARED_LIBRARIES/libOmxVenc_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem out/target/product/satsuki/obj/include -isystem device/sony/common-headers/kernel-headers -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libm/include -isystem bionic/libm/include/arm -c -fno-exceptions -Wno-multichar -msoft-float -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a7 -D__ARM_FEATURE_LPAE=1 -mfloat-abi=softfp -mfpu=neon -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc -target arm-linux-androideabi -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -fvisibility-inlines-hidden -Wsign-promo -Wno-inconsistent-missing-override -nostdlibinc -target arm-linux-androideabi -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -g -O3 -Dlrintf=_ffix_r -D__align=__alignx -D__alignx\\(x\\)=__attribute__\\(\\(__aligned__\\(x\\)\\)\\) -DT_ARM -Dinline=__inline -D_ANDROID_ -UENABLE_DEBUG_LOW -DENABLE_DEBUG_HIGH -DENABLE_DEBUG_ERROR -UINPUT_BUFFER_LOG -UOUTPUT_BUFFER_LOG -USINGLE_ENCODER_INSTANCE -DMAX_RES_1080P -DMAX_RES_1080P_EBI -D_MSM8974_ -DUSE_ION -D_ANDROID_ICS_ -fPIC -D_USING_LIBCXX -std=gnu++14 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d -o out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.o hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp ) && (cp out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d >> out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.P; rm -f out/target/product/satsuki/obj_arm/SHARED_LIBRARIES/libOmxVenc_intermediates/venc/src/video_encoder_device_v4l2.d )"
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:412:33: error: use of undeclared identifier 'V4L2_EVENT_MSM_VIDC_CLOSE_DONE'
if (dqevent.type == V4L2_EVENT_MSM_VIDC_CLOSE_DONE) {
^
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:459:5: error: use of undeclared identifier 'V4L2_EVENT_MSM_VIDC_CLOSE_DONE'
V4L2_EVENT_MSM_VIDC_CLOSE_DONE,
^
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:467:26: error: invalid application of 'sizeof' to an incomplete type 'const int []'
int array_sz = sizeof(event_type)/sizeof(int);
^~~~~~~~~~~~
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:1072:26: error: invalid application of 'sizeof' to an incomplete type 'const int []'
int array_sz = sizeof(event_type)/sizeof(int);
^~~~~~~~~~~~
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp:2771:67: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat]
DEBUG_PRINT_ERROR("Failed setting color format in in etb %x", m_sVenc_cfg.inputformat);
~~ ^~~~~~~~~~~~~~~~~~~~~~~
%lx
hardware/qcom/media/msm8974/mm-video-v4l2/vidc/../vidc/common/inc/vidc_debug.h:48:23: note: expanded from macro 'DEBUG_PRINT_ERROR'
ALOGE(fmt,##args)
^~~~
system/core/include/log/log.h:156:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
^~~~~~~~~~~
system/core/include/log/log.h:453:38: note: expanded from macro 'ALOG'
LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
^~~~~~~~~~~
system/core/include/log/log.h:461:37: note: expanded from macro 'LOG_PRI'
android_printLog(priority, tag, __VA_ARGS__)
^~~~~~~~~~~
system/core/include/log/log.h:618:36: note: expanded from macro 'android_printLog'
__android_log_print(prio, tag, fmt)
^~~
1 warning and 4 errors generated.
[ 65% 31667/48245] target Package: fra...amework-res_intermediates/package.apk)
warning: string 'gsm_alphabet_default_charset' has no default translation.
warning: string 'gsm_alphabet_default_charset' is missing 90 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: string 'wfcSpnFormat' has no default translation.
warning: string 'wfcSpnFormat' is missing 41 required localizations: az_AZ be_BY bn_BD bs_BA en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU et_EE eu_ES gl_ES gu_IN hy_AM is_IS ka_GE kk_KZ km_KH kn_IN ky_KG lo_LA mk_MK ml_IN mn_MN mr_IN ms_MY my_MM ne_NP pa_IN si_LK sq_AL ta_IN te_IN ur_PK uz_UZ zh_CN zh_HK zh_TW
warning: no entries written for dimen/password_keyboard_height (0x010500c3)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (01:50:50 (hh:mm:ss)) ####
Thanks in advance guys.
I would like to ask for help with get root access for AOSP apk broadcast receiver.
I need receive event for change date/time and I need run my shell command for write system time to hardware RTC.
I have chosen follow principe:
- I wrote Android myBR.apk in AOSP with broadcast receiver for TIME_SET, TIMEZONE_CHANGED
- From myBR.apk I run my shell command (rtcclock -w)
- "rtcclock -w" shell command which is write system time from Android to RTC via /dev/rtc0 -> ioctl( i2c )
My problem is:
==============
I need run shell command rtcclock from AOSP myBR.apk as root.
My all attempts were unsuccessful.
I would like to ask for help from some experts how can I resolve this problem.
Environment info (everything in Android shell terminal)
=======================================================
Android device is not rooted
Permissions for su shell command
$ ls -lZ /system/xbin/su
-rwsr-x--- root shell ubject_r:su_exec:s0 su
SELinux status
$ getenforce
Disabled
Super user information
$ su
# id
uid=0(root) gid=0(root) groups=1007(log)
Android version
$ cat /system/build.prop | grep "ro.build.version.release"
ro.build.version.release=5.1.1
Kernel version
$ cat /proc/version
Linux version 3.4.39 .....
Permissions for rtcclock shell command
$ ls -l /system/bin/rtcclock
-rwxr-xr-x root shell 13672 2017-10-18 09:53 rtcclock
Example for try write system time from Android to RTC as user = shell from
$ rtcclock -w
rtcclock: can't open '/dev/misc/rtc': No such file or directory
Example for try write system time from Android to RTC as user = system
$ su system
$ rtcclock -w
rtcclock: ioctl 0x4024700a failed: Permission denied
Example for try write system time from Android to RTC as user = root
$ su
# rtcclock -w
successfull
My source code:
MyBroadcastReceiver.java
========================
package com.example.mybr;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
public class MyBroadcastReceiver extends BroadcastReceiver {
private static final String TAG = "MyBroadcastReceiver";
public MyBroadcastReceiver() {
super();
Log.i( TAG, "MyBroadcastReceiver - created" );
}
@override
public void onReceive( Context context, Intent intent )
{
final String intentAction = intent.getAction();
boolean bResult = false;
if( intentAction.equals( Intent.ACTION_TIME_CHANGED ) ||
intentAction.equals( Intent.ACTION_TIMEZONE_CHANGED ) )
{
bResult = runCmd( "sh", "id" );
Log.i( TAG, "bResult = " + bResult );
bResult = runCmd( "su", "id" );
Log.i( TAG, "bResult = " + bResult );
bResult = runCmd( "su", "rtcclock -w" );
Log.i( TAG, "bResult = " + bResult );
}
}
public static boolean runCmd( String...commands )
{
boolean bResult = false;
try
{
Process prcs = Runtime.getRuntime().exec( commands[ 0 ] );
DataOutputStream cmdStream = new DataOutputStream( prcs.getOutputStream() );
DataInputStream resStream = new DataInputStream( prcs.getInputStream() );
DataInputStream errStream = new DataInputStream( prcs.getErrorStream() );
if( cmdStream != null && resStream != null && errStream != null )
{
for( int n = 1; n < commands.length; n++ )
{
Log.d( TAG, "cmd: " + commands[ n ] );
cmdStream.writeBytes( commands[ n ] + "\n" );
cmdStream.flush();
do
{
String outputResult = resStream.readLine();
Log.d( TAG, "cmd result: " + outputResult );
} while( resStream.available() > 0 );
while( errStream.available() > 0 )
{
String outputResult = errStream.readLine();
Log.d( TAG, "cmd error: " + outputResult );
}
}
bResult = true;
cmdStream.writeBytes( "exit\n" );
cmdStream.flush();
try
{
prcs.waitFor();
} catch( InterruptedException e )
{
Log.i( TAG, "!!! EXCEPTION_1 !!!" );
e.printStackTrace();
}
}
if( cmdStream != null )
{
cmdStream.close();
}
if( resStream != null )
{
resStream.close();
}
if( errStream != null )
{
errStream.close();
}
}
catch( IOException e )
{
Log.i( TAG, "!!! EXCEPTION_2 !!!" );
e.printStackTrace();
}
return( bResult );
}
}
AndroidManifest.xml
===================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="...schemas.android.com/apk/res/android"
package="com.example.mybr"
android:sharedUserId="android.uid.shell">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true">
<receiver
android:name=".MyBroadcastReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.TIME_SET"/>
<action android:name="android.intent.action.TIMEZONE_CHANGED"/>
</intent-filter>
</receiver>
</application>
</manifest>
Android.mk
==========
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
# Only compile source java files in this apk.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := myBR
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_PATH := $(TARGET_OUT)/priv-app
include $(BUILD_PACKAGE)
# Use the following include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
Listing from logcat (as you can see su always failed)
===================
10-28 14:08:28.821 455-455/system_process I/PackageManager: /system/priv-app/myBR changed; collecting certs
10-28 14:08:28.855 455-455/system_process I/art: DexFile_isDexOptNeeded file /system/priv-app/myBR/arm/myBR.odex needs to be relocated for /system/priv-app/myBR/myBR.apk
10-28 14:08:42.875 455-455/system_process I/art: DexFile_isDexOptNeeded file /system/priv-app/myBR/arm/myBR.odex needs to be relocated for /system/priv-app/myBR/myBR.apk
10-28 14:08:42.876 455-455/system_process I/PackageManager: Running patchoat on: com.example.mybr
10-28 14:08:42.878 631-631/? E/installd: Running /system/bin/patchoat isa=arm in-fd=5 (/system/priv-app/myBR/arm/myBR.odex) out-fd=6 (/data/dalvik-cache/arm/[email protected]@[email protected]@classes.dex)
10-03 14:11:47.001 455-501/system_process I/ActivityManager: Start proc 1795:com.example.mybr/2000 for broadcast com.example.mybr/.MyBroadcastReceiver
10-03 14:11:47.115 455-499/system_process W/InputMethodManagerService: Window already focused, ignoring focus gain of: [email protected] attribute=null, token = [email protected]
10-03 14:11:47.181 1795-1795/com.example.mybr I/MyBroadcastReceiver: MyBroadcastReceiver - created
10-03 14:11:47.214 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd: id (added my note: runCmd( "sh", "id" )
10-03 14:11:47.268 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd result: uid=2000(shell) gid=2000(shell) groups=1015(sdcard_rw),1023(media_rw),1028(sdcard_r),3002(net_bt),3008(net_bt_stack),9997(everybody),42000(u0_a32000)
10-03 14:11:47.275 1795-1795/com.example.mybr I/MyBroadcastReceiver: bResult = true
10-03 14:11:47.297 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd: id (added my note: runCmd( "su", "id" )
10-03 14:11:47.306 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd result: null
10-03 14:11:47.309 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd error: su: permission denied (added mine detection: call function setgidI() return -1 from su.c)
10-03 14:11:47.310 1795-1795/com.example.mybr I/MyBroadcastReceiver: !!! EXCEPTION_2 !!!
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: java.io.IOException: write failed: EPIPE (Broken pipe)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at libcore.io.IoBridge.write(IoBridge.java:502)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at java.io.FileOutputStream.write(FileOutputStream.java:186)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at java.iutputStream.write(OutputStream.java:82)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at java.io.DataOutputStream.writeBytes(DataOutputStream.java:156)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at com.example.mybr.MyBroadcastReceiver.runCmd(MyBroadcastReceiver.java:77)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at com.example.mybr.MyBroadcastReceiver.onReceive(MyBroadcastReceiver.java:33)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2609)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread.access$1700(ActivityThread.java:151)
10-03 14:11:47.310 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at android.os.Looper.loop(Looper.java:135)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5254)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at java.lang.reflect.Method.invoke(Native Method)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at java.lang.reflect.Method.invoke(Method.java:372)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at libcore.io.Posix.writeBytes(Native Method)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at libcore.io.Posix.write(Posix.java:258)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
10-03 14:11:47.311 1795-1795/com.example.mybr W/System.err: at libcore.io.IoBridge.write(IoBridge.java:497)
10-03 14:11:47.312 1795-1795/com.example.mybr W/System.err: ... 15 more
10-03 14:11:47.312 1795-1795/com.example.mybr I/MyBroadcastReceiver: bResult = true
10-03 14:11:47.337 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd: rtcclock -w (added my note: runCmd( "su", "rtcclock -w" )
10-03 14:11:47.340 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd result: null
10-03 14:11:47.342 1795-1795/com.example.mybr D/MyBroadcastReceiver: cmd error: su: permission denied (added mine detection: call function setgidI() return -1 from su.c)
10-03 14:11:47.342 1795-1795/com.example.mybr I/MyBroadcastReceiver: !!! EXCEPTION_2 !!!
10-03 14:11:47.342 1795-1795/com.example.mybr W/System.err: java.io.IOException: write failed: EPIPE (Broken pipe)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at libcore.io.IoBridge.write(IoBridge.java:502)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at java.io.FileOutputStream.write(FileOutputStream.java:186)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at java.iutputStream.write(OutputStream.java:82)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at java.io.DataOutputStream.writeBytes(DataOutputStream.java:156)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at com.example.mybr.MyBroadcastReceiver.runCmd(MyBroadcastReceiver.java:77)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at com.example.mybr.MyBroadcastReceiver.onReceive(MyBroadcastReceiver.java:36)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread.handleReceiver(ActivityThread.java:2609)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread.access$1700(ActivityThread.java:151)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at android.os.Looper.loop(Looper.java:135)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5254)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at java.lang.reflect.Method.invoke(Native Method)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at java.lang.reflect.Method.invoke(Method.java:372)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
10-03 14:11:47.343 1795-1795/com.example.mybr W/System.err: Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
10-03 14:11:47.344 1795-1795/com.example.mybr W/System.err: at libcore.io.Posix.writeBytes(Native Method)
10-03 14:11:47.344 1795-1795/com.example.mybr W/System.err: at libcore.io.Posix.write(Posix.java:258)
10-03 14:11:47.344 1795-1795/com.example.mybr W/System.err: at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
10-03 14:11:47.344 1795-1795/com.example.mybr W/System.err: at libcore.io.IoBridge.write(IoBridge.java:497)
10-03 14:11:47.344 1795-1795/com.example.mybr W/System.err: ... 15 more
10-03 14:11:47.344 1795-1795/com.example.mybr I/MyBroadcastReceiver: bResult = true
10-03 14:11:47.354 1388-1388/com.android.deskclock V/AlarmClock: AlarmInitReceiver android.intent.action.TIME_SET
10-03 14:11:47.384 1388-1647/com.android.deskclock V/AlarmClock: AlarmInitReceiver finished
10-03 14:11:47.395 455-498/system_process I/ActivityManager: Killing 1368:com.android.music/u0a33 (adj 15): empty #17
10-03 14:11:47.408 455-455/system_process W/MediaSessionRecord: Removing dead callback in pushEvent.
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:496)
at android.media.session.ISessionControllerCallback$Stub$Proxy.onSessionDestroyed(ISessionControllerCallback.java:189)
at com.android.server.media.MediaSessionRecord.pushSessionDestroyed(MediaSessionRecord.java:667)
at com.android.server.media.MediaSessionRecord.access$3800(MediaSessionRecord.java:67)
at com.android.server.media.MediaSessionRecord$MessageHandler.handleMessage(MediaSessionRecord.java:1286)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at com.android.server.SystemServer.run(SystemServer.java:269)
at com.android.server.SystemServer.main(SystemServer.java:170)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Thank you very much for help.
When I build arom for my device ,Ihave aproblem that I can't slove :crying:
make_vars-mk_N939St.mk:362: warning: Soong: -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -fno-canonical-system-headers -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -fno-strict-volatile-bitfields -DNDEBUG -O2 -g -Wstrict-aliasing=2 -fgcse-after-reload -frerun-cse-after-loop -frename-registers -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -fdiagnostics-color -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -mcpu=cortex-a53
/home/jack/Mokee/O/out/soong/make_vars-mk_N939St.mk:810: error: Soong variable check failed.
18:19:38 ckati failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1