讓Android設備永不鎖屏
讓Android設備永不鎖屏(續)
修改兩個檔案
frameworks/base/packages/SettingsProvider/res/values/defaults.xml
找到def_screen_off_timeout
將60000修改成-1
frameworks/policies/base/phone/com/android/internal/policy/impl/KeyguardViewMediator.java
找到mExternallyEnabled
設定成false
之後mm
make snod
出來的system.img發現無效 ??
make clean
rebuild
紀錄一下make snod的message
nelsonchung@gps1004:~/myandroid9.1/frameworks/policies/base/phone$ vim com/android/internal/policy/impl/KeyguardViewMediator.java
找到mExternallyEnabled
設定成false
nelsonchung@gps1004:~/myandroid9.1/frameworks/policies/base/phone$ mm showcommands
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2
TARGET_PRODUCT=imx51_bbg
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=FRF85B
============================================
No private recovery resources for TARGET_DEVICE imx51_bbg
make: Entering directory `/home/nelsonchung/myandroid9.1'
Copy: out/target/product/imx51_bbg/root/init.rc
out/host/linux-x86/bin/acp -fpt device/fsl/imx5x/init.rc out/target/product/imx51_bbg/root/init.rc
target Java: android.policy_phone (out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes)
rm -f out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes-full-debug.jar
rm -rf out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes
mkdir -p out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes
for f in ; do if [ ! -f $f ]; then echo Missing file $f; exit 1; fi; unzip -qo $f -d out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes; (cd out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes && rm -rf META-INF); done
if [ -d "out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/src" ]; then find out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/src -name '*.java' >> out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates//java-source-list; fi
tr ' ' '\n' < out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates//java-source-list | sort -u > out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates//java-source-list-uniq
javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999 -encoding ascii -bootclasspath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar -classpath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar:out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar:out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar -g -extdirs "" -d out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes \@out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates//java-source-list-uniq || ( rm -rf out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes ; exit 41 )
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
rm -f out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates//java-source-list
rm -f out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates//java-source-list-uniq
mkdir -p out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/
jar -cf out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes-full-debug.jar -C out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes .
rm -rf out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes
make: Leaving directory `/home/nelsonchung/myandroid9.1'
nelsonchung@gps1004:~/myandroid9.1/frameworks/base/packages/SettingsProvider$ vim res/values/defaults.xml
找到def_screen_off_timeout
將60000修改成-1
nelsonchung@gps1004:~/myandroid9.1/frameworks/base/packages/SettingsProvider$ mm showcommands
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2
TARGET_PRODUCT=imx51_bbg
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=FRF85B
============================================
No private recovery resources for TARGET_DEVICE imx51_bbg
make: Entering directory `/home/nelsonchung/myandroid9.1'
Copy: out/target/product/imx51_bbg/root/init.rc
out/host/linux-x86/bin/acp -fpt device/fsl/imx5x/init.rc out/target/product/imx51_bbg/root/init.rc
target R.java/Manifest.java: SettingsProvider (out/target/common/obj/APPS/SettingsProvider_intermediates/src/R.stamp)
out/host/linux-x86/bin/aapt package -z -m -J out/target/common/obj/APPS/SettingsProvider_intermediates/src -M frameworks/base/packages/SettingsProvider/AndroidManifest.xml -P out/target/common/obj/APPS/SettingsProvider_intermediates/public_resources.xml -S frameworks/base/packages/SettingsProvider/res -I out/target/common/obj/APPS/framework-res_intermediates/package-export.apk -G out/target/common/obj/APPS/SettingsProvider_intermediates/proguard_options --min-sdk-version 8 --target-sdk-version 8 --version-code 8 --version-name 2.2
for GENERATED_MANIFEST_FILE in `find out/target/common/obj/APPS/SettingsProvider_intermediates/src \
-name Manifest.java 2> /dev/null`; do \
dir=`grep package $GENERATED_MANIFEST_FILE | head -n1 | \
awk '{print $2}' | tr -d ";" | tr . /`; \
mkdir -p out/target/common/R/$dir; \
out/host/linux-x86/bin/acp -fpt $GENERATED_MANIFEST_FILE out/target/common/R/$dir; \
done;
for GENERATED_R_FILE in `find out/target/common/obj/APPS/SettingsProvider_intermediates/src \
-name R.java 2> /dev/null`; do \
dir=`grep package $GENERATED_R_FILE | head -n1 | \
awk '{print $2}' | tr -d ";" | tr . /`; \
mkdir -p out/target/common/R/$dir; \
out/host/linux-x86/bin/acp -fpt $GENERATED_R_FILE out/target/common/R/$dir \
|| exit 31; \
out/host/linux-x86/bin/acp -fpt $GENERATED_R_FILE out/target/common/obj/APPS/SettingsProvider_intermediates/src/R.stamp || exit 32; \
done; \
target Java: SettingsProvider (out/target/common/obj/APPS/SettingsProvider_intermediates/classes)
rm -f out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-debug.jar
rm -rf out/target/common/obj/APPS/SettingsProvider_intermediates/classes
mkdir -p out/target/common/obj/APPS/SettingsProvider_intermediates/classes
for f in ; do if [ ! -f $f ]; then echo Missing file $f; exit 1; fi; unzip -qo $f -d out/target/common/obj/APPS/SettingsProvider_intermediates/classes; (cd out/target/common/obj/APPS/SettingsProvider_intermediates/classes && rm -rf META-INF); done
if [ -d "out/target/common/obj/APPS/SettingsProvider_intermediates/src" ]; then find out/target/common/obj/APPS/SettingsProvider_intermediates/src -name '*.java' >> out/target/common/obj/APPS/SettingsProvider_intermediates//java-source-list; fi
tr ' ' '\n' < out/target/common/obj/APPS/SettingsProvider_intermediates//java-source-list | sort -u > out/target/common/obj/APPS/SettingsProvider_intermediates//java-source-list-uniq
javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999 -encoding ascii -bootclasspath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar -classpath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar:out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar:out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar -g -extdirs "" -d out/target/common/obj/APPS/SettingsProvider_intermediates/classes \@out/target/common/obj/APPS/SettingsProvider_intermediates//java-source-list-uniq || ( rm -rf out/target/common/obj/APPS/SettingsProvider_intermediates/classes ; exit 41 )
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
rm -f out/target/common/obj/APPS/SettingsProvider_intermediates//java-source-list
rm -f out/target/common/obj/APPS/SettingsProvider_intermediates//java-source-list-uniq
mkdir -p out/target/common/obj/APPS/SettingsProvider_intermediates/
jar -cf out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-debug.jar -C out/target/common/obj/APPS/SettingsProvider_intermediates/classes .
rm -rf out/target/common/obj/APPS/SettingsProvider_intermediates/classes
Copying: out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-debug.jar
out/host/linux-x86/bin/acp -fpt out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-debug.jar out/target/common/obj/APPS/SettingsProvider_intermediates/emma_out/lib/classes-full-debug.jar
Copying: out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-names.jar
out/host/linux-x86/bin/acp out/target/common/obj/APPS/SettingsProvider_intermediates/emma_out/lib/classes-full-debug.jar out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-names.jar
Copying: out/target/common/obj/APPS/SettingsProvider_intermediates/classes.jar
out/host/linux-x86/bin/acp out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-names.jar out/target/common/obj/APPS/SettingsProvider_intermediates/classes.jar
target Dex: SettingsProvider
out/host/linux-x86/bin/dx -JXms16M -JXmx1536M --dex --output=out/target/common/obj/APPS/SettingsProvider_intermediates/classes.dex out/target/common/obj/APPS/SettingsProvider_intermediates/classes.jar
target Package: SettingsProvider (out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk)
touch out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates//dummy
(cd out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/ && jar cf package.apk dummy)
zip -qd out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk dummy
rm out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates//dummy
out/host/linux-x86/bin/aapt package -u -z -c en_US,en_GB,fr_FR,it_IT,es_ES,es_US,de_DE,nl_NL,cs_CZ,pl_PL,zh_TW,zh_CN,ru_RU,ko_KR,nb_NO,pt_PT,pt_BR,da_DK,el_GR,sv_SE,tr_TR,ja_JP,hdpi,mdpi,nodpi -M frameworks/base/packages/SettingsProvider/AndroidManifest.xml -S frameworks/base/packages/SettingsProvider/res -I out/target/common/obj/APPS/framework-res_intermediates/package-export.apk --min-sdk-version 8 --target-sdk-version 8 --version-code 8 --version-name 2.2 -F out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk
out/host/linux-x86/bin/aapt add -k out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk out/target/common/obj/APPS/SettingsProvider_intermediates/classes.dex
'out/target/common/obj/APPS/SettingsProvider_intermediates/classes.dex' as 'classes.dex'...
mv out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.unsigned
java -jar out/host/linux-x86/framework/signapk.jar build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.unsigned out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.signed
mv out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.signed out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk
mv out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.unaligned
out/host/linux-x86/bin/zipalign -f 4 out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.unaligned out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.aligned
mv out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk.aligned out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk
Install: out/target/product/imx51_bbg/system/app/SettingsProvider.apk
out/host/linux-x86/bin/acp -fpt out/target/product/imx51_bbg/obj/APPS/SettingsProvider_intermediates/package.apk out/target/product/imx51_bbg/system/app/SettingsProvider.apk
make: Leaving directory `/home/nelsonchung/myandroid9.1'
沒有留言:
張貼留言