I have cm 10.1 ported for the I8200.
Ist my 1st release.
Can try it anyone?
You can it here download..
mega.nz/#!c81jGTTB!PFNdEa-gPIzhuHXugL5U8RCk9EYje7DgClDr_Q54cmc
dflow681 said:
I have cm 10.1 ported for the I8200.
Ist my 1st release.
Can try it anyone?
You can it here download..
mega.nz/#!c81jGTTB!PFNdEa-gPIzhuHXugL5U8RCk9EYje7DgClDr_Q54cmc
Click to expand...
Click to collapse
Hello there, that's a big process about VE.
Thanks!
I could not test it.
I did it because min son one has, but I do not want to brake that.
I've bought for testing on ebay a used one.
I get it nights week.
and then I'll try it.
all should work.
I have the prebuild kernel used by Samsung.
and have a few changes adopted from the device sources of Samsung.
I tested it.
but it can not be installed.
it always comes an error in TWRP.
I'll try it on ...
only 147mb?
photos please
Thanks for your work.
Im alredy opened cm10.1 rom porting thread , maybe you share link for my 3k subs thread
dflow681 said:
I have cm 10.1 ported for the I8200.
Ist my 1st release.
Can try it anyone?
You can it here download..
mega.nz/#!c81jGTTB!PFNdEa-gPIzhuHXugL5U8RCk9EYje7DgClDr_Q54cmc
Click to expand...
Click to collapse
Thanks for your efforts! I think it will not work because there is no selinux in the Samsung kernel at the moment, so this will also not work for the recovery.
Did you put your sources also on github? I'm also started to try to work on the kernel, and maybe we can share...
send with my Oneplus One (bacon) SlimKat Tapatalk
SolarPlexus said:
Thanks for your efforts! I think it will not work because there is no selinux in the Samsung kernel at the moment, so this will also not work for the recovery.
Did you put your sources also on github? I'm also started to try to work on the kernel, and maybe we can share...
send with my Oneplus One (bacon) SlimKat Tapatalk
Click to expand...
Click to collapse
i have my sources put on github...
github.com/dflow81
dflow681 said:
i have my sources put on github...
github.com/dflow81
Click to expand...
Click to collapse
I'll check tomorrow, thanks!
send with my Oneplus One (bacon) SlimKat Tapatalk
I have the device folder renamed goldenve3g as it is written in build.prob under ro.product.device.
now no error message comes when flashing.
but it only takes 5 seconds and then the flash process is finished.
but it starts the original rom again.
I think the error is in the recovery.fstab.
if I take the fstab.pxa988 the phone I get an error when compiling.
I suppose because there is no boot partition there.
but I do not know which partition it on the phone can be.
i have uploadet the new rom...
https://mega.nz/#!I5dTjbyA!xbQuCryvSb4gUwtHWm1Cta6Dn10Rf4UgximUcjTZeBU
dflow681 said:
I have the device folder renamed goldenve3g as it is written in build.prob under ro.product.device.
now no error message comes when flashing.
but it only takes 5 seconds and then the flash process is finished.
but it starts the original rom again.
I think the error is in the recovery.fstab.
if I take the fstab.pxa988 the phone I get an error when compiling.
I suppose because there is no boot partition there.
but I do not know which partition it on the phone can be.
i have uploadet the new rom...
https://mega.nz/#!I5dTjbyA!xbQuCryvSb4gUwtHWm1Cta6Dn10Rf4UgximUcjTZeBU
Click to expand...
Click to collapse
Can you tell me what source did you used for making the the device-tree? Maybe check my github-files (for sure not finished, but working hard on it in future But contained there all what I found for our device)
https://github.com/MasterPlexus?tab=repositories
thanks.. i'll try it...
i have tested, but its not work too...
my new device tree is here..
https://github.com/dflow81
PHP:
i-4.6/bin:/home/david/android/system/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.6/bin:/home/david/android/system/development/emulator/qtools:/home/david/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin:/home/david/android/system/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:/home/david/android/system/development/scripts:/home/david/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 5 -ne 4 -a 5 -ne 5 -a 5 -ne 6 ']'
+ SRC_DIR=/home/david/android/system/out/target/product/goldenve3g/data
+ '[' '!' -d /home/david/android/system/out/target/product/goldenve3g/data ']'
+ OUTPUT_FILE=/home/david/android/system/out/target/product/goldenve3g/userdata.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=data
+ SIZE=0x0148600000
+ FC=
+ case $EXT_VARIANT in
+ '[' -z data ']'
+ '[' -z 0x0148600000 ']'
+ '[' -n '' ']'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -l 0x0148600000 -a data /home/david/android/system/out/target/product/goldenve3g/userdata.img /home/david/android/system/out/target/product/goldenve3g/data'
+ echo make_ext4fs -s -l 0x0148600000 -a data /home/david/android/system/out/target/product/goldenve3g/userdata.img /home/david/android/system/out/target/product/goldenve3g/data
make_ext4fs -s -l 0x0148600000 -a data /home/david/android/system/out/target/product/goldenve3g/userdata.img /home/david/android/system/out/target/product/goldenve3g/data
+ make_ext4fs -s -l 0x0148600000 -a data /home/david/android/system/out/target/product/goldenve3g/userdata.img /home/david/android/system/out/target/product/goldenve3g/data
Need size of filesystem
+ '[' 1 -ne 0 ']'
+ exit 4
error: failed to build /home/david/android/system/out/target/product/goldenve3g/userdata.img from /home/david/android/system/out/target/product/goldenve3g/data
build/core/Makefile:1042: recipe for target '/home/david/android/system/out/target/product/goldenve3g/userdata.img' failed
make: *** [/home/david/android/system/out/target/product/goldenve3g/userdata.img] Error 1
make: *** Deleting file '/home/david/android/system/out/target/product/goldenve3g/userdata.img'
make: *** Auf noch nicht beendete Prozesse wird gewartet …
# In case value of PACKAGES is empty.
You can do this guy
i have changed the partitions size from Hex to Dec.
an then comes this error..
PHP:
uct.brand': 'samsung', 'persist.sys.root_access': '1', 'ro.build.version.release': '4.2.2', 'ro.cm.version': '10.1-20151217-UNOFFICIAL-goldenve3g', 'ro.build.version.codename': 'REL', 'ro.com.android.wifi-watchlist': 'GoogleGuest', 'ro.config.ringtone': 'Orion.ogg', 'net.bt.name': 'Android', 'ro.url.legal.android_privacy': 'http://www.google.com/intl/%s/mobile/android/basic/privacy.html', 'ro.build.type': 'userdebug', 'ro.product.model': 'goldenve3g', 'ro.config.alarm_alert': 'Hassium.ogg', 'keyguard.no_require_sim': 'true', 'ro.config.notification_sound': 'Argon.ogg'}
default_system_dev_certificate = (str) build/target/product/security/testkey
extfs_sparse_flag = (str) -s
extra_recovery_keys = (str) build/target/product/security/cm
fs_type = (str) ext4
fstab = (dict) {'/dev/block/mmcblk0p9': <common.Partition object at 0x7f3daaf95e10>, '/dev/block/mmcblk0p11': <common.Partition object at 0x7f3daaf95e90>, '/dev/block/mmcblk0p10': <common.Partition object at 0x7f3daaf95d90>, '/dev/block/mmcblk0p12': <common.Partition object at 0x7f3daaf95d50>, '/dev/block/mmcblk0p15': <common.Partition object at 0x7f3daaf95a90>, '/dev/block/mmcblk0p14': <common.Partition object at 0x7f3daaf95c90>, '/dev/block/mmcblk0p16': <common.Partition object at 0x7f3daaf95cd0>}
mkbootimg_args = (str) --ramdisk_offset 0x11000000
recovery_api_version = (int) 2
recovery_size = (int) 16777216
system_size = (int) 1594884096
tool_extensions = (str) device/samsung/goldenve3g/../common
userdata_size = (int) 5509218304
using device-specific extensions in device/samsung/common
unable to load device-specific module; assuming none
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 865, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 833, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 409, in WriteFullOTAPackage
script.Mount("/system")
File "/home/david/android/system/build/tools/releasetools/edify_generator.py", line 150, in Mount
p = fstab[mount_point]
KeyError: '/system'
build/core/Makefile:1335: recipe for target '/home/david/android/system/out/target/product/goldenve3g/cm_goldenve3g-ota-82bc670d5c.zip' failed
make: *** [/home/david/android/system/out/target/product/goldenve3g/cm_goldenve3g-ota-82bc670d5c.zip] Error 1
has anyone an idea???
Nancy3i8ht said:
You can do this guy
Click to expand...
Click to collapse
i hope...
do you have own sources?
if you are developing for the same device...
dflow681 said:
i hope...
do you have own sources?
if you are developing for the same device...
Click to expand...
Click to collapse
I fear, you and me are the only ones which work on source-depending developement for this device.
My sources, I fear additionaly, are not actual on github. I will try to sync them this weekend. the compile will work, but the rom is not booting I know. Nevertheless, I think the best will be, to bring the kernel start to work, and/or try to modify the boot-partition that we can connect per adb as soon as possible (while booting), to get the needed logs that we can see what happened while booting. without that, a developement is not really possible i guess. Did you have experiances on that? Maybe start whith the recovery-file to try what is possible...
I did it...
Look at tahe picture ...
but it hangs while bootscreen.
Wtf ? Rom is working ?
---------- Post added at 21:02 ---------- Previous post was at 20:57 ----------
Im hope your work
Related
Trying to compile the source for the archos gen 8s. If I can compile it, I might be able to add in root support, but I have hit a snag. When I compile I get this:
Code:
make[4]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gthread'
make[3]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gthread'
Making install in gobject
make[3]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
/usr/bin/make glib-genmarshal
make[4]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
make[4]: `glib-genmarshal' is up to date.
make[4]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
&& echo "#define __G_MARSHAL_H__" >> xgen-gmh \
&& --nostdinc --prefix=g_cclosure_marshal ./gmarshal.list --header >> xgen-gmh \
&& echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
&& (cmp -s xgen-gmh gmarshal.h 2>/dev/null || cp xgen-gmh gmarshal.h) \
&& rm -f xgen-gmh xgen-gmh~ \
&& echo timestamp > stamp-gmarshal.h
[COLOR="Red"]/bin/bash: line 2: --nostdinc: command not found[/COLOR]
make[3]: *** [stamp-gmarshal.h] Error 127
make[3]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5/gobject'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/glib-2.16.5'
make: *** [/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib/libglib-2.0.a] Error 2
I googled around and was unable to figure out what is going on there. --nostdinc should be a command for GCC, but doesn't seem to be working correctly. When I run gcc -v I get:
Code:
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
PS If you do get it compiled I found where you can override user for certain applications: /buildroot/package/dbus/archos.conf
It looks like this:
Code:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="com.archos.emaild"/>
</policy>
<!-- Add your service name
<policy user="root">
<allow own="com.archos.Service"/>
</policy>
-->
</busconfig>
the whole build process seems to be buggy as hell
# make menuconfig
results in
Code:
package/Config.in:443: can't open file "package/apdf/Config.in"
# make clean
results in
Code:
/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
make[2]: *** [uninstall-info-am] Error 1
make[2]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7/doc'
make[1]: *** [uninstall-recursive] Error 1
make[1]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7'
make: *** [diffutils-clean] Error 2
How long did yours compile for? Mine compiled for over an hour before failing.
I'll start all over again and measure it.
Code:
/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibcgnueabi-gcc -shared .libs/libgphoto2_la-gphoto2-abilities-list.o .libs/libgphoto2_la-ahd_bayer.o .libs/libgphoto2_la-bayer.o .libs/libgphoto2_la-gphoto2-camera.o .libs/libgphoto2_la-gphoto2-context.o .libs/libgphoto2_la-exif.o .libs/libgphoto2_la-gphoto2-file.o .libs/libgphoto2_la-gphoto2-filesys.o .libs/libgphoto2_la-gamma.o .libs/libgphoto2_la-jpeg.o .libs/libgphoto2_la-gphoto2-list.o .libs/libgphoto2_la-gphoto2-result.o .libs/libgphoto2_la-gphoto2-version.o .libs/libgphoto2_la-gphoto2-setting.o .libs/libgphoto2_la-gphoto2-widget.o -Wl,--rpath -Wl,/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/lib -L/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib -L/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/lib -L/usr/lib -lgphoto2_port -L/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/lib -L/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/lib -lltdl -lm -isysroot /data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir -mtune=cortex-a8 -isysroot /data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir -mtune=cortex-a8 -Wl,-soname -Wl,libgphoto2.so.2 -Wl,-version-script -Wl,.libs/libgphoto2.ver -o .libs/libgphoto2.so.2.4.0
/usr/lib/libltdl.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
libtool: install: error: relink `libgphoto2.la' with the above command before installing it
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/libgphoto2-2.4.9.1/libgphoto2'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/libgphoto2-2.4.9.1/libgphoto2'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/libgphoto2-2.4.9.1'
make: *** [/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/lib/libgphoto2.so] Error 2
real 38m3.275s
user 50m36.129s
sys 6m27.836s
I don't know why it's referring to /usr/lib/libltdl.so because this would be a 64bit lib of my linux machine. bug?
You two realise that you can't just use a PC version of gcc to compile an arm version of sw?
You need the crosscompile toolchain to do this, and than its working correctly.
the toolchain is inside the xxx.tgz archive and it is used for building. no need for extra toolchain
But laptopfeak is using something that does:
Target: i686-linux-gnu
wrong. he just typed gcc -v in his shell. this uses of course his very own gcc and not the one served by the archos toolchain.
when I type gcc -v using the archos toolchain it looks like this:
# gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/arm-linux-gcc -v
Using built-in specs.
Target: arm-linux-uclibcgnueabi
Configured with: /data/temp/archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/gcc-4.4.1/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=arm-linux-uclibcgnueabi --enable-languages=c,c++ --with-sysroot=/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir --with-build-time-tools=/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/arm-linux-uclibcgnueabi/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-shared --with-gmp=/data/temp/archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/gmp --with-mpfr=/data/temp/archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/mpfr --disable-nls --enable-threads --disable-multilib --with-tune=cortex-a8 --with-cpu=cortex-a8 --with-arch=armv7-a --with-fpu=vfp3 --with-float=softfp
Thread model: posix
gcc version 4.4.1 (GCC)
Click to expand...
Click to collapse
the toolchain builds the crosscompiler itself and then starts crosscompiling
I did find out why I was getting one of the errors. I was missing some dependencies. Found a quick tutorial on how to compile the kernel for the gen7. http://archos.g3nius.org/index.php?title=Compiling_gen7-gpl
Now I am getting an error about the .config file being out of date. Odd thing is that the make menuconfig does not work... as previously mentioned.
Code:
PATH="/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/toolchain_build_arm/bin:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/bin:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/:/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" \
./Configure linux-arm --prefix=/ \
--openssldir=/lib/ssl -L/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib -ldl \
-I/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/include threads \
shared no-idea no-mdc2 no-rc5)
Configuring for linux-arm
IsWindows=0
CC =gcc
CFLAG =-fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -I/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/include -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DL_ENDIAN -DTERMIO -fomit-frame-pointer -Wall
EX_LIBS =-L/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/lib -ldl -ldl
BN_ASM =bn_asm.o
DES_ENC =des_enc.o fcrypt_b.o
BF_ENC =bf_enc.o
CAST_ENC =c_enc.o
RC4_ENC =rc4_enc.o
RC5_ENC =rc5_enc.o
MD5_OBJ_ASM =
SHA1_OBJ_ASM =
RMD160_OBJ_ASM=
PROCESSOR =
RANLIB =/usr/bin/ranlib
ARFLAGS =
PERL =/usr/bin/perl
THIRTY_TWO_BIT mode
DES_RISC1 used
BN_LLONG mode
RC4_CHUNK is undefined
make[1]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
Makefile is older than Makefile.org.
Reconfigure the source tree (via './config' or 'perl Configure'), please.
make[1]: *** [Makefile] Error 1
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
/usr/bin/make MAKE="/usr/bin/make -j1" CC=/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibcgnueabi-gcc -C /home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m all build-shared
make[1]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
Makefile is older than Makefile.org.
Reconfigure the source tree (via './config' or 'perl Configure'), please.
make[1]: *** [Makefile] Error 1
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m'
make: *** [/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/build_arm/openssl-0.9.7m/apps/openssl] Error 2
[email protected]:~/Downloads/Archos/gen8-gpl-froyo/buildroot$ make menuconfig
make CC="/usr/bin/gcc" -C package/config conf mconf
make[1]: Entering directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/package/config'
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c conf.c -o conf.o
conf.c: In function ‘conf_askvalue’:
conf.c:104: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
conf.c: In function ‘conf_choice’:
conf.c:362: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c kxgettext.c -o kxgettext.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/checklist.c -o lxdialog/checklist.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/inputbox.c -o lxdialog/inputbox.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/menubox.c -o lxdialog/menubox.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/textbox.c -o lxdialog/textbox.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/util.c -o lxdialog/util.o
/usr/bin/gcc -DCURSES_LOC="<ncurses.h>" -DLOCALE -g -O2 -c lxdialog/yesno.c -o lxdialog/yesno.o
make[1]: *** No rule to make target `/usr/include/ncurses/ncurses.h', needed by `mconf.o'. Stop.
make[1]: Leaving directory `/home/jonathan/Downloads/Archos/gen8-gpl-froyo/buildroot/package/config'
make: *** [package/config/mconf] Error 2
Oh and this does seem to be the buggiest source/compile I have ever dealt with. But I did talk to someone on xchat last night and they said that they got it to compile out of box.
I installed a fresh ubuntu 10.10 into a virtual machine and installed the packages mentioned on this website: http://archos.g3nius.org/index.php?title=Compiling_gen7-gpl
currently building.. stay tuned..
edit: still buggy
Finally got it to compile thanks to jensbln:
According to him you have to: "disable gdb in /buildroot/local/g8_arm/g8_arm.config"
So I poked around in the g8_arm.config and found the gdb. I then set all instances of gdb to n instead of y. I then had to sudo make, because I was getting permission demied. After that it compiled fine.
Let's see if this works for me too...
edit: failed on the x64 machine.. not that surprisingly as others had problems too. testing on x32..
damn, its not working (failed because of missing symlinks to libmpfr.so.1)..
edit: ahh.. it seems that i missed this dependency: libmpfr1ldbl
edit2: yes, this was the missing dependency.
using a fresh ubuntu 10.10 x32, to compile the froyo gpl sources install these packages:
Code:
# apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl automake autoconf libtool gettext texinfo libmpfr1ldbl
edit3: make menuconfig does work too
Code:
# cd gen8-gpl-froyo/linux
# cp linux.config .config
# make oldconfig
# make menuconfig
chulri said:
the whole build process seems to be buggy as hell
# make menuconfig
results in
Code:
package/Config.in:443: can't open file "package/apdf/Config.in"
# make clean
results in
Code:
/data/temp/archos/gen8-gpl-froyo/buildroot/project_build_arm/uclibc/root/usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
make[2]: *** [uninstall-info-am] Error 1
make[2]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7/doc'
make[1]: *** [uninstall-recursive] Error 1
make[1]: Leaving directory `/data/temp/archos/gen8-gpl-froyo/buildroot/build_arm/diffutils-2.8.7'
make: *** [diffutils-clean] Error 2
Click to expand...
Click to collapse
you are not supposed to use "make menuconfig"
just type "make" in the buildroot folder and it will build the kernel and buildroot packages that are in gen8 units...
@_nz_ you're late, see my last post.
btw: yes I'm supposed to use make menuconfig when I want to change kernel settings without changing the kernel config file manually
chulri said:
@_nz_ you're late, see my last post.
btw: yes I'm supposed to use make menuconfig when I want to change kernel settings without changing the kernel config file manually
Click to expand...
Click to collapse
sure. I was referring more to make menuconfig in buildroot which is not used during our SW development, so it's not really "supported" and might be broken. All our configs are hardcoded
it's not used inside buildroot, I use it inside linux
btw: do you work at archos?
chulri said:
it's not used inside buildroot, I use it inside linux
btw: do you work at archos?
Click to expand...
Click to collapse
Assuming it is the same nz that posts at archosfans then yes he/she is an Archos employee.
blazingwolf said:
Assuming it is the same nz that posts at archosfans then yes he/she is an Archos employee.
Click to expand...
Click to collapse
yes, we are
Hey -nz- I posted this on the Archos Fans forum in response to an answer to my question; why can't we reflash to 2.1. You probably didn't see it......what do you say?
Thanks for the reply about the bootloader. Again ignorance on my part. Surely Archos could release a patch that would allow the bootloader to install any version of the OS? I mean its all just code going into a certain memory address. I have a hard time with companies like Archos who seem to make things difficult for owners. I can see Apple doing it because they really are the 800 pound gorilla in the corner but the Dev Team and smart guys have always found a way round what they do. Archos are a relatively small fish in the pond. The tablet scene is moving very fast and new tablets are coming out every day.
It reminds me of the Pandigital novel. We pleaded with Pandigital to give us the source code. They said they would but never did. The smart guys were able to do wonders with what they had but ultimately within 3 months people had given up and moved on. Once the smart guys were gone all development stopped and now the PDN is just a mostly forgotten memory. If Pandigital had of opened up, the word of mouth would have spread, people would have bought their reader, hacked it and they would have both sold more and got the hearts and minds (and money) of people who would have considered any product they brought out. Now they are pretty much dead in the water and will likely just stay selling photo frames. People and technology has passed them by.
I won't say the same will happen to Archos. They are a bigger fish but they seem to have generated a lot of ill will over the 2.2 release. Even all those who were trumpeting how wonderful 2.2 was going to be have slunk away. Apple will bring out a new iPad next year. The price of the present one is dropping and will continue to do so. Say what you like about the iPad, but it works and it works well. It's too big and I'll probably sell mine again in a month or so depending on what comes out next in the 7 to 8 inch form factor.
Archos have the opportunity to buck the trend and open their software up and let people make it fly. There are some really sharp, switched on guys out there and if given the encouragement and support by Archos, they could do wonders. How cool would it be for Archos to be known as the one company that actually helped and supported its customers. The hardware is all there, the software is lacking but it is easier to make something better if it is only the software that is holding back the hardware.
So come on Mr Archos, if you are reading this, do some deep thinking. Be the tablet company of the people. Lets see some liberté, égalité, fraternité.
Build-kernel
Building Kernel only from Oppo Source
"Official Oppo Find 5 kernel source":https://github.com/oppo-source/Find5-Kernel-Source
EDIT: the 12025_release_defconfig doesn't work for me (touchscreen doesn't respond). Most likely a change needs to be made here
Code:
446,447c436,437
< CONFIG_TOUCHSCREEN_MELFAS=y
< CONFIG_TOUCHSCREEN_SYNAPTICS_S3202_I2C_RMI=y
---
> CONFIG_TOUCHSCREEN_ATMEL_MXT=y
> CONFIG_TOUCHSCREEN_CYTTSP_I2C_QC=y
Check out the source code
Code:
git clone git://github.com/oppo-source/Find5-Kernel-Source.git
Using +12025_debug_defconfig+ as config. You can use +12025_release_defconfig+ , with some modifications to the source to make it work properly
Code:
cd Find5-Kernel-Source
make ARCH=arm clean
make ARCH=arm 12025_debug_defconfig
edit include/config/kernel.release
if you want to modify the kernel version numbering
Build
Code:
make -j4 ARCH=arm CROSS_COMPILE=arm-eabi-
or use this following (uses as many cores as your computer has
Code:
make -j$(grep -c ^processor /proc/cpuinfo) ARCH=arm CROSS_COMPILE=arm-eabi-
\n if you want to use the +12025_release_defconfig+, there are some config problems. I have fixed them in my github
My github (use the branch [*]config-fixes): https://github.com/ngvincent/android-kernel-oppo-find5
The end, you'll get two files (Image and zImage) inside arch/arm/boot
Image = full kernel image, zImage = compressed version
*_The boot partition has ~10MB of space(see bottom of page for details). Make sure your kernel+ramdisk doesn't exceed this_*
Make boot.img file (need to add ramdisk)
Copy the ramdisk from existing device or ROM. "Here":https://git.ngvincent.com/attachments/download/5/ramdisk.gz is one I extracted from the X909EN_13_130307 rom
Extracting kernel from device
Code:
adb shell
su
dd if=/dev/block/mmcblk0p18 of=/sdcard/boot.img
exit
adb pull /sdcard/boot.img
Extracting from boot.img
Code:
abootimg -x boot.img
Making boot.img
Copy the stuff below into a file called bootimg.cfg (gives the configuration for abootimg to create the img properly)
Code:
bootsize =
pagesize = 0x800
kerneladdr = 0x80208000
ramdiskaddr = 0x82200000
secondaddr = 0x81100000
tagsaddr = 0x80200100
name =
cmdline = console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3
Code:
abootimg --create bootimage.img -f bootimg.cfg -k zImage -r ramdisk.gz
Flash kernel onto device
You'll need to use fastboot to do it. I need to sudo as root for fastboot to work properly
Code:
adb reboot bootloader
sudo -s
fastboot devices
fastboot flash boot bootimage.img
fastboot reboot
verify
Code:
adb shell
cat /proc/version
Linux version 3.4.0-perf-g5d91181 ([email protected]) (gcc version 4.4.3 (GCC) ) [*]1 SMP PREEMPT Sat Mar 16 13:29:19 EDT 2013
partition space on the device
Code:
adb shell
cat /proc/partitions
Code:
179 18 10240 mmcblk0p18
Code:
[email protected]:/dev/block/platform/msm_sdcc.1/by-name $ ls -la
lrwxrwxrwx root root 1970-01-16 12:58 DDR -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 1970-01-16 12:58 aboot -> /dev/block/mmcblk0p17
lrwxrwxrwx root root 1970-01-16 12:58 boot -> /dev/block/mmcblk0p18
Looks like there's plenty of space for the kernel/boot.img - 10240 kilobytes
Thanks for this. While this is way beyond my skill level, I'm glad the info is available. I'm slowing scratching the surface.. just recently learned how to build Nightlies! Thanks
Sent from my X909 using Tapatalk 2
Coreym said:
just recently learned how to build Nightlies! Thanks
Sent from my X909 using Tapatalk 2
Click to expand...
Click to collapse
are you planning on making nightlies for the oppo ?
CoopZor said:
are you planning on making nightlies for the oppo ?
Click to expand...
Click to collapse
I think kAmMa is working on CM right now? So hopefully we will have the CM Rom to install on the Find 5 in the near future. I know he said that he almost had it complete but was having problems with the drivers for the display and needed the drivers from the source code. Now that the source code has been released we might see something good soon. I don't know if his CM will be the official CM release though. We do need an official CM for the Find 5 though.
Personally, I would like to see Paranoid Android 3+ on the Find 5 as its my favorite rom, and it would be amazing on the Find 5. I use it as my daily on my Nexus 4 and 7 and both run great!
This is out of my league also, I wish I could build some good kernels and Roms. I will beta test Roms and Kernels if anyone needs me too though.
Coreym said:
Thanks for this. While this is way beyond my skill level, I'm glad the info is available. I'm slowing scratching the surface.. just recently learned how to build Nightlies! Thanks
Sent from my X909 using Tapatalk 2
Click to expand...
Click to collapse
once you get the hang of linux build tools, the next part is rather easy
I'm porting over the changes that faux123 made in his kernel for the Nexus 4 (same Qualcomm S4Pro APQ8064 processor+SoC)...
finished reading his mods for voltage control, i'll probably slicing in the code tomorrow...
I'm not touching CM10 (or AOKP/Paranoid...) porting yet... had some experience with kernel development a few years ago, but not for android porting...
error when run Command
I got error when run Command : make ARCH=arm clean , how can I fix it?
PHP:
[email protected]:~/aosp/kernel/Find5-4.2-kernel-source-master$ make ARCH=arm clean
scripts/Makefile.clean:17: /home/war/aosp/kernel/Find5-4.2-kernel-source-master/drivers/networkpmsmodule/Makefile: No such file or directory
make[2]: *** No rule to make target `/home/war/aosp/kernel/Find5-4.2-kernel-source-master/drivers/networkpmsmodule/Makefile'. Stop.
make[1]: *** [drivers/networkpmsmodule] Error 2
make: *** [_clean_drivers] Error 2
#### make failed to build some targets (1 seconds) ####
Hello everyone,
I've come across, and been asked, a lot of questions regarding how to properly setup a build environment on OS X, so I'm going to make this guide on how to setup a build environment on OS X 10.9 Mavericks.
this is only for setting up the build environment, and since most ROMs use different configurations, you will need to refer to your specific ROM for how to initialize their source and build
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Setting Up an Android Build Environment on OS X 10.9 Mavericks
A Word To The Wise
Code:
/**
* if you don't follow my instructions exactly as they are written, several things will happen:
* 1 - If you don't know what you're doing, it won't work
* 2 - I won't respond with help, since everything you need IS RIGHT HERE
**/
Click to expand...
Click to collapse
What You Will Be Installing:
XCode 5
Android SDK (includes ADB and Fastboot)
repo
Homebrew
Many, many packages required for building Android
Click to expand...
Click to collapse
XCode
XCode is roughly a 4 GB download from the AppStore. Once it is downloaded, it will start an installation process, where it will download more software and install XCode on your system. Depending on your hardware, and your internet speeds, this could take a long time.
Apple XCode 5 for OS X 10.9 Mavericks
Or just search for "XCode" in the App Store
Once XCode is downloaded and installed, you can pretty much forget about it. Just don't uninstall it.
Click to expand...
Click to collapse
Java
Java for OS X 2013-005
Click to expand...
Click to collapse
Android SDK
Android SDK
Extract the contents of the Android SDK download archive to a new folder and name it android-sdk
Create a new folder in your HOME directory ( ~/ ) named android [your home directory can be found by opening Finder, and clicking on your username in the column to the left]
Move the android-sdk folder INTO the android folder you just made in your Home directory ( it will be ~/android/android-sdk )
Using Finder, navigate to the android/android-sdk/tools folder.
Double-click the "android" file and go through the installer for Android SDK
Click to expand...
Click to collapse
Homebrew
Code:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
This will begin the download and installation of Brew.
Depending on your hardware and internet connection, this could take a bit.
Now, we need to run a few commands through Brew, just to make sure everything is installed correctly. Enter the following into the Terminal:
Code:
brew outdated && brew update && brew upgrade && brew doctor
After running brew doctor, you should receive a message saying the follow: Your system is ready to brew.
Now, we can install the packages required to build Android.
Click to expand...
Click to collapse
Required Packages For Compiling Android
Enter the following command into the Terminal:
Code:
brew install git coreutils findutils gnu-sed gnupg pngcrush python
This WILL take a while.
Click to expand...
Click to collapse
Repo
Open Terminal and enter the following:
Code:
mkdir -p ~/.bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Click to expand...
Click to collapse
Creating A Case-Sensitive Volume
We need to create a CASE-SENSITIVE image for our development. Android cannot be build on case-insensitive images, so we need to make one.
Enter the following into the Terminal.
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
I have it set to be 60 GB here, but you can increase or decrease the size to whatever you choose, simply change the "60" to any number of GB you want it to be. I generally use 100 GB.
Once the command is done, you will see a new .img on your desktop, called android.sparseimage. This is the volume you just created that will store your source. To mount it, you just simply double-click it.
Click to expand...
Click to collapse
Setting Up bash_profile
Enter the following into Terminal:
Code:
~/.bash_profile
Now copy / paste this into the terminal, so it's in the bash_profile you're creating:
Code:
export PATH=~/bin:$PATH
export PATH=~/android/android-sdk/sdk/platform-tools:$PATH
export PATH=/usr/local/bin:$PATH
export BUILD_MAC_SDK_EXPERIMENTAL=1
export LC_CTYPE=C
export LANG=C
Save it by pressing Ctrl + X , then Ctrl + Y
Once back at the command line in Terminal, enter the following:
Code:
source ~/.bash_profile
Click to expand...
Click to collapse
Necessary cherry-picks for OS X compatibility
Here is a list of commits, organized alphabetically by repository, that you will need to cherry-pick in order to ensure the best compatibility for building on OS X:
If you come across other commits related to building on OS X that I have not listed, PLEASE respond to the thread and mention me. I'll get them added!
build
https://github.com/CyanogenMod/android_build/commit/e04d4ddad4790a5f67d96873890cdc8230f0e18a
openssl / sha1sum errors?
https://github.com/CyanogenMod/android_build/commit/18c1d6d96df97b975b87a2736446c9dfd3ab4169
readink -f errors?
https://github.com/omnirom/android_build/commit/27e819cd6b6c44cbb86a0dc2bd3d735ad5dc09e7
sed/gsed errors that is NOT "sed: RE error: illegal byte sequence"?
https://github.com/omnirom/android_build/commit/24b9c1bfe07d24f7e2a425d9d5aae52fd30f3819
errors with the zip creation?
https://github.com/omnirom/android_build/commit/08c61654feff40eeec04eef40f4970408de1e229
JNI errors in /external/chromium_org ?
external_chromium_org
https://github.com/CyanogenMod/andr...mmit/5130af630390487b37d99941887883647c67f37a
Click to expand...
Click to collapse
That's it. Refer to your individual ROM source for how to sync the manifests and get builds going. Happy building!
This is amazing. Thank you so much!
I get the following error everytime:
Code:
Creating filesystem with parameters:
Size: 13725835264
Block size: 4096
Blocks per group: 32768
Inodes per group: 8144
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 3351034
Block groups: 103
Reserved block group size: 823
Created filesystem with 11/838832 inodes and 93654/3351034 blocks
+ '[' 0 -ne 0 ']'
stat: cannot read file system information for `%z': No such file or directory
/bin/bash: File: "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 : syntax error in expression (error token is ": "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 ")
make: *** [/Volumes/android/omni/out/target/product/hammerhead/userdata.img] Error 1
make: *** Deleting file `/Volumes/android/omni/out/target/product/hammerhead/userdata.img'
make: *** Waiting for unfinished jobs....
real 8m50.579s
user 1m9.360s
sys 0m46.059s
I get this building Omni but I don't get it building CM11
Any idea?
installing repo
for others using this awesome guide, don't forget to install repo in terminal the following commands before initializing repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
fzr-r4 said:
for others using this awesome guide, don't forget to install repo in terminal the following commands before initializing repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Click to expand...
Click to collapse
repo should be installed with brew, no need to download the binary from google :good: although, i may be wrong
jakew02 said:
repo should be installed with brew, no need to download the binary from google :good: although, i may be wrong
Click to expand...
Click to collapse
Hello everyone, I`m getting the following error when trying to build Kitkat. If any help is given it will be greatly appreciated.
Code:
ldldld::: warning:warning warning: directory:directory notdirectory notfoundnot foundforfound foroptionfor 'option-option Lout '/'-host-LoutLout///darwinhost-host/x86/darwin/darwin--objx86x86///libobjobj/'/lib
lib'ld'
:
ld ld:warning:: warningwarning:option: -options option- is-s sobsoleteis obsoleteandis andbeing obsoletebeing ignoredandignored
ldbeingld: :ignoredunknown
unknownoptionld :option :-: O2-unknown
O2
option: -O2
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/validatekeymaps_intermediates/validatekeymaps] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/darwin-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
case-sensitive output directory/volume
building Paranoid Android using the team's script for the build itself after syncing, I had to specify the output directory first, out I got an error saying I was building on a case-insensitive system:
export OUT_DIR_COMMON_BASE=YOUR-VOLUME-AND-DESTINATION-HERE
Sent from my Nexus 5 using Tapatalk 4
Another Build Error
Now I`m getting the following error, does anyone knows if I can just manually create the missing directory to skip the error?
Thanks in advance.
Code:
host C: libbz <= external/bzip2/bzlib.c
Import includes file: out/host/darwin-x86/obj/EXECUTABLES/bsdiff_intermediates/import_includes
host C++: validatekeymaps <= frameworks/base/tools/validatekeymaps/Main.cpp
host StaticLib: libinput (out/host/darwin-x86/obj/STATIC_LIBRARIES/libinput_intermediates/libinput.a)
host StaticLib: libutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/libutils.a)
host StaticLib: libcutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a)
host C: acp <= build/tools/acp/acp.c
host StaticLib: liblog (out/host/darwin-x86/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a)
host Executable: aidl (out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl)
host StaticLib: libhost (out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
host C++: aapt <= frameworks/base/tools/aapt/Command.cpp
host C++: aapt <= frameworks/base/tools/aapt/CrunchCache.cpp
host C++: aapt <= frameworks/base/tools/aapt/FileFinder.cpp
host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
host C++: aapt <= frameworks/base/tools/aapt/Package.cpp
host C++: aapt <= frameworks/base/tools/aapt/StringPool.cpp
ld: warning: directory not found for option '-Lout/host/darwin-x86/obj/lib'
ld: warning: option -s is obsolete and being ignored
ld: unknown option: -O2
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
make: *** Waiting for unfinished jobs....
sigh . . . Paranoid Android 4 completes a build for me on Mavericks, but root and wi-fi are broken. Terminal and Solid Explorer also don't work. :crying:
just putting this out there as a data point in case others try building PA on OS X.
EDIT:
i noticed that Symlink lines such as:
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/xbin/rdev -> busybox
or
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/bin/du -> toolbox
are resulting in those files (/system/xbin/rdev or /system/bin/du) being created in my .zip file, whereas a successful build from another user does not have those files.
this seems to be part of my problem--anyone have any guidance or similar issues?
Thanks for this guide!!
Thanks boys i am triying it on snow leopard with omnirom
nazforex said:
I get the following error everytime:
Code:
Creating filesystem with parameters:
Size: 13725835264
Block size: 4096
Blocks per group: 32768
Inodes per group: 8144
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 3351034
Block groups: 103
Reserved block group size: 823
Created filesystem with 11/838832 inodes and 93654/3351034 blocks
+ '[' 0 -ne 0 ']'
stat: cannot read file system information for `%z': No such file or directory
/bin/bash: File: "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 : syntax error in expression (error token is ": "/Volumes/android/omni/out/target/product/hammerhead/userdata.img"
ID: 100000600000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 39237622 Free: 18393164 Available: 18393164
Inodes: Total: 39237620 Free: 18393164
+
0 ")
make: *** [/Volumes/android/omni/out/target/product/hammerhead/userdata.img] Error 1
make: *** Deleting file `/Volumes/android/omni/out/target/product/hammerhead/userdata.img'
make: *** Waiting for unfinished jobs....
real 8m50.579s
user 1m9.360s
sys 0m46.059s
I get this building Omni but I don't get it building CM11
Any idea?
Click to expand...
Click to collapse
CM11 uses gstat, where Omni is using stat. I had to troubleshoot this too. in "build/core/combo/HOST_darwin-x86.mk" the last line should be
Code:
# $(1): The file to check
define get-file-size
GSTAT=$(which gstat) ; \
if [ ! -z "$GSTAT" ]; then \
gstat -c "%s" $(1) ; \
else \
stat -f "%z" $(1) ; \
fi
endef
That should fix the compile error for the userdata.img
this i s awesome! thanks for the guide. kinda tired of using a virtual machine to build android
Got a question. Is brew needed for just building kernels? I usually use ubuntu for my builds but I would like to use osx if I could as well.
Congrats @jakew02 Your outstanding guide made it to the Portal!
Check out the article HERE.
MikeC84 said:
Got a question. Is brew needed for just building kernels? I usually use ubuntu for my builds but I would like to use osx if I could as well.
Click to expand...
Click to collapse
I believe so. Brew is basically a tool that allows Linux CLI commands to be run on OS X, so you wouldn't be able to execute the necessary tools for building anything, but I'm not 100% sure.
EverDeathly said:
this i s awesome! thanks for the guide. kinda tired of using a virtual machine to build android
Click to expand...
Click to collapse
Yea, using VM's kind of sucks because you are unable to utilize the full power of your hardware
werty100 said:
Thanks boys i am triying it on snow leopard with omnirom
Click to expand...
Click to collapse
should be relatively the same with some very minor changes, I built on Snow Leopard using these directions, you will definitely NOT need to worry about switch.pm stuff with snow leopard.
fzr-r4 said:
sigh . . . Paranoid Android 4 completes a build for me on Mavericks, but root and wi-fi are broken. Terminal and Solid Explorer also don't work. :crying:
just putting this out there as a data point in case others try building PA on OS X.
EDIT:
i noticed that Symlink lines such as:
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/xbin/rdev -> busybox
or
Symlink: /volumes/teamusb/output/android/target/product/hammerhead/system/bin/du -> toolbox
are resulting in those files (/system/xbin/rdev or /system/bin/du) being created in my .zip file, whereas a successful build from another user does not have those files.
this seems to be part of my problem--anyone have any guidance or similar issues?
Click to expand...
Click to collapse
I've had issues building OmniROM with stuff like this as well, and was never able to/didn't put much effort into finding the source. If you know what the cause of these device functions is please PM me the solution and I will make sure to update the OP with a quote from you :highfive:
joneidy said:
Now I`m getting the following error, does anyone knows if I can just manually create the missing directory to skip the error?
Thanks in advance.
Code:
host C: libbz <= external/bzip2/bzlib.c
Import includes file: out/host/darwin-x86/obj/EXECUTABLES/bsdiff_intermediates/import_includes
host C++: validatekeymaps <= frameworks/base/tools/validatekeymaps/Main.cpp
host StaticLib: libinput (out/host/darwin-x86/obj/STATIC_LIBRARIES/libinput_intermediates/libinput.a)
host StaticLib: libutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/libutils.a)
host StaticLib: libcutils (out/host/darwin-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a)
host C: acp <= build/tools/acp/acp.c
host StaticLib: liblog (out/host/darwin-x86/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a)
host Executable: aidl (out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl)
host StaticLib: libhost (out/host/darwin-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
host C++: aapt <= frameworks/base/tools/aapt/Command.cpp
host C++: aapt <= frameworks/base/tools/aapt/CrunchCache.cpp
host C++: aapt <= frameworks/base/tools/aapt/FileFinder.cpp
host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
host C++: aapt <= frameworks/base/tools/aapt/Package.cpp
host C++: aapt <= frameworks/base/tools/aapt/StringPool.cpp
ld: warning: directory not found for option '-Lout/host/darwin-x86/obj/lib'
ld: warning: option -s is obsolete and being ignored
ld: unknown option: -O2
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
make: *** Waiting for unfinished jobs....
Hello everyone, I`m getting the following error when trying to build Kitkat. If any help is given it will be greatly appreciated.
Code:
ldldld::: warning:warning warning: directory:directory notdirectory notfoundnot foundforfound foroptionfor 'option-option Lout '/'-host-LoutLout///darwinhost-host/x86/darwin/darwin--objx86x86///libobjobj/'/lib
lib'ld'
:
ld ld:warning:: warningwarning:option: -options option- is-s sobsoleteis obsoleteandis andbeing obsoletebeing ignoredandignored
ldbeingld: :ignoredunknown
unknownoptionld :option :-: O2-unknown
O2
option: -O2
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
make: *** [out/host/darwin-x86/obj/EXECUTABLES/validatekeymaps_intermediates/validatekeymaps] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/darwin-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1
make: *** [out/host/darwin-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
Click to expand...
Click to collapse
Looks like your missing ld to me? try brew install ld, if that doesn't work, just google "how to install ld with brew" :highfive:
Thank you for this awesome guide. I have one question.
I have the latest Java installed, should I uninstall it before I follow this guide?
Sent from my Evo 3D CDMA using Tapatalk
jakew02 said:
I believe so. Brew is basically a tool that allows Linux CLI commands to be run on OS X, so you wouldn't be able to execute the necessary tools for building anything, but I'm not 100% sure.
Click to expand...
Click to collapse
Thanks. After running brew doctor I am not getting "ready to brew"
Code:
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libosxfuse_i32.2.dylib
/usr/local/lib/libosxfuse_i64.2.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libosxfuse_i32.la
/usr/local/lib/libosxfuse_i64.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/osxfuse.pc
MikeC84 said:
Thanks. After running brew doctor I am not getting "ready to brew"
Code:
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libosxfuse_i32.2.dylib
/usr/local/lib/libosxfuse_i64.2.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libosxfuse_i32.la
/usr/local/lib/libosxfuse_i64.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/osxfuse.pc
Click to expand...
Click to collapse
i never personally got that error, but it looks like you should be able to just delete the files listed here. Just make sure you have ALL of your stuff backed up before doing anything in the OS X system files. I'm not 100% though, so worse you can do is try it and see
Need Help
Nevermind, figured it out, it was the way i was typing the command, re-entered it as:
nano -w ~/.bash_profile
and it took me to the correct location.
Hello Everyone, I am completely new to this and was wondering if any of you could help me with a question:
When i try to add the new text to the .bash_profile file i get this error:
[ Error writing /Users/dfrias84/Users/dfrias84/.bash_profile: No such file or ]
Why is this error popping up?
I noticed every time i type the code into terminal (nano -w ~/Users/dfrias84/.bash_profile) it opens nano with this:
GNU nano 2.0.6 File: /Users/dfrias84/Users/dfrias84/.bash_profile
Why is the directory different from what i typed into the command?
Overview
I've created a very simple #!/bin/bash script (attached) to automate the initial build or subsequent rebuild of SpookCity138's ROM:
Slim Rom 7 for the Samsung S5 mini G800f (kminilte). The script simply automates the steps and processes created by others (none of which is my own work - all credit goes to the original creators). I have only tested this script on my own working environment: Gnome Ubuntu 17.04; 16GB RAM; i7-7700HQ; If your environment differs from this your experience may differ from mine.
How to Execute script
See readme at: https://github.com/fidoedidoe/build_scripts
Thanks
@spookcity138, @jimmy999x. Taking the time to educate me at each and every tentative step and demonstrating great patience
Contributors
spookcity138
jimmy999x
Script Source
The latest version of the script (and others for different devices) can be found here: https://github.com/fidoedidoe/build_scripts
SpookCity138's ROM
https://forum.xda-developers.com/galaxy-s5-mini/development/rom-slim-rom-7-nougat-t3558926
Created 2017-09-20
Last Updated 2017-12-09
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
wow, excellent, I have reviewed the code (I have not executed it yet) looks pretty good, it should work, I have to copy your script and modify it for other roms, thanks!
edit 1: it is possible to use this script (I use it and it works perfect) to automate even more the process of configuring the compilation environment https://github.com/akhilnarang/scripts
Also, for Ubunt 16.04 I added a couple more to make it easier some things:
cmake
nautilus (optional)
phablet-tools
unrar
silversearcher-ag (this is optional, but extremely useful for me, allows me to find the problematic lines inside a document or folder)
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
You need to apply some SELinux, CAF, And CM/LOS Patches to build a Nougat ROM for G800H, or that rom will not boot, or will shall not pass from build errors.
Is not a easy task.....
lfom said:
There are sources to build this ROM for the Snapdragon variant (G800H)? It's a very good device, but simply there is not a single Nougat ROM for it...
Click to expand...
Click to collapse
i found this on YT
so far so good for me
give it a try
https://youtu.be/UPOpJgqnlf8
not working for me -- using xubuntu 17.10
ko_taka said:
not working for me -- using xubuntu 17.10
Click to expand...
Click to collapse
Script updated on github (follow links for build_slimrom7_kminilte.sh). Tested on my laptop (Ubuntu gnome 17.04) and SlimRom7 version 1.17 builds successfully (although I have yet to test the build on the device). I'll update the attached zip in the opening page in the coming days, but as a general rule github is the best place to find latest version(s).
Thanks to @spookcity138 (again) for taking time the time and offering sound help / advice identifying the issues and resolve (the issue was within applying device specific patches ./apply.sh).
I am on 40GB partition. Not enough?
perly terminated.
Fetching projects: 70% (381/544) fatal: unable to access 'https://android.googlesource.com/platform/hardware/akm/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 73% (398/544) fatal: unable to access 'https://android.googlesource.com/platform/system/connectivity/shill/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
Fetching projects: 74% (403/544) fatal: unable to access 'https://android.googlesource.com/platform/external/jsr330/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
error: Cannot fetch platform/external/jsr330
Fetching projects: 78% (425/544) fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: write error: No space left on device
fatal: index-pack failed
error: index-pack died
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
fatal: index-pack failed
error: Cannot fetch SlimRoms/frameworks_base
Click to expand...
Click to collapse
ko_taka said:
I am on 40GB partition. Not enough?
Click to expand...
Click to collapse
Yeah,you're running out of space. I don't recall exactly what the sources and the build of a nougat ROM take,space wise. It seems a little weird you were running out of space syncing the sources. If I recall correctly nougat sources are somewhere between 25-30GB. I could be wrong though. The actual build itself (the out folder) also takes a fair bit of space. Again,just guessing,but around 15-20GB. I would say 60GB would be what you need.
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
build_slimrom7_kminilte.sh: 176: build_slimrom7_kminilte.sh: [[: not found
Remove references to OmniRom recovery...
remove config_uriBlruEnabled references, spoils the build...
alter local manifest files for slimrom 7 build compatability...
insert text into file: frameworks/base/core/res/res/values/config.xml...
delete file cm_arrays.xml...
remove flipflap stuff from device/samsung/smdk3470-common/smdk3470-common.mk...
build_slimrom7_kminilte.sh: 205: read: Illegal option -t
build_slimrom7_kminilte.sh: 210: build_slimrom7_kminilte.sh: [[: not found
patching file include/telephony/ril.h
Hunk #1 FAILED at 31.
Hunk #2 succeeded at 395 (offset -1 lines).
Hunk #3 succeeded at 409 (offset -1 lines).
Hunk #4 succeeded at 569 (offset -1 lines).
Hunk #5 succeeded at 624 (offset -1 lines).
Hunk #6 succeeded at 1023 (offset -1 lines).
Hunk #7 succeeded at 5217 (offset -1 lines).
Hunk #8 succeeded at 5866 (offset -1 lines).
1 out of 8 hunks FAILED -- saving rejects to file include/telephony/ril.h.rej
manually reapplying failed Hunk #1...
patching file ril/Android.mk
patching file ril/libril/Android.mk
patching file ril/libril/ril.cpp
patching file ril/libsecril-client/Android.mk
applying frameworks_av to frameworks/av
Applying: av: Add samsung wfd service
Applying: add Android M MediaBufferGroup:MediaBufferGroup() for libwvm.so
applying frameworks_native to frameworks/native
Applying: Revert "Remove Parcel::writeIntPtr."
Applying: add missing const getSensorList() for MM gpsd (G800FXXU1CPK5)
applying hardware_libhardware to hardware/libhardware
applying hardware_ril to hardware/ril
Applying: ril: recover on crash
applying hardware_samsung_ril to hardware/samsung/ril
Applying: add SetAudioMode and SetSoundClockMode for MM audio-ril
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/build_scripts/packages/services/Telephony: No such file or directory
build_slimrom7_kminilte.sh: 238: read: Illegal option -t
build_slimrom7_kminilte.sh: 243: build_slimrom7_kminilte.sh: [[: not found
prepare device specific code...
build_slimrom7_kminilte.sh: 249: build_slimrom7_kminilte.sh: source: not found
build_slimrom7_kminilte.sh: 250: build_slimrom7_kminilte.sh: lunch: not found
running croot...
build_slimrom7_kminilte.sh: 253: build_slimrom7_kminilte.sh: croot: not found
build_slimrom7_kminilte.sh: 262: read: Illegal option -t
build_slimrom7_kminilte.sh: 267: build_slimrom7_kminilte.sh: [[: not found
running mka bacon...
build_slimrom7_kminilte.sh: 273: build_slimrom7_kminilte.sh: mka: not found
Click to expand...
Click to collapse
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
The build did not start. It applied the patches successfully (all but one where there was an error) Then it is just a serious of failures. I have not used this script so I cant say specifically where you are going wrong. Does the script have executable permissions? (I assume so as it partially worked) Do you have all of the need dependencies for building Android? Thats not the issue I don't think,but you need them either way. Other than that I am not real sure honestly. You may need to wait for @fidoedidoe to help you. I'll reply back if any possible reason comes to mind.
ko_taka said:
hi spookcity138, nice to see you around
I haven't coded that so I'm feeling a bit lost
The process finally ended (now I am on 80GB partition)
I do not know where is the build if that built anything
those are the last lines
Click to expand...
Click to collapse
Hi @ko_taka
@spookcity138 is correct, the script failed...when it succeeds it's pretty clear the last few messages published will read along the lines of: "Package Complete: .../out/target/product/kminilte/Slim-kminilte-7.1.2.build.1.17-UNOFFICIAL-20171209-1401.zip" followed by "#### make completed successfully (24:30 (mm:ss)) ####" (note the build time will vary depending on the power of your build machine and utilisation of ccache). Oh, FYI - my build folder is ~95GB in size (the ../out/ folder is 26GB and the ../.repo/ folder is 47GB!!)
Back to the script failure....first verify the following variable in the build_slimrom7_kminilte.sh is defined correctly for your environment:
Code:
WORK_DIRECTORY="$HOME/android/slimrom7"
For my personal build environment I keep the script (build_slimrom7_kminilte.sh) in a separate folder to where the source is located and the build is output to (just so i can purge those folders without losing the build script). FYI on your laptop your folder structure should look something like that shown below, with build_slimrom7.kminilte.sh stored in the folder .../build_scripts
Code:
/home/ferran/android/build_scripts
/home/ferran/android/slimrom7
Once the above is verified...the primary issue you have is every time you see "...[[: not found", the script is hitting an issue. Check that the first line of the script contains the line "#!/bin/bash ", this is called "shebang" and it tells your shell what program to interpret the script with, in our case we need "Bash". I'm now wondering what OS / Shell you're using (I use Ubuntu Gnome 17.04 with Bash version 4.4.7) does yours differ from this? To verify your Bash version:
Code:
$ bash -version
GNU bash, version 4.4.7(1)-release (x86_64-pc-linux-gnu)
Copyright © 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
You could try forcing your shell to use bash (from memory), by switching to the /build_scripts/ folder and running the following command (do not use sudo or any elevated permissions):
Code:
$ cd /home/ferran/android/build_scripts
$ ./build_slimrom7_kminilte.sh
Let me know how you get on, in essence the script is failing on the evaluation lines where "if [[....]]" is used. if we can't get it to work, in your case, the script may need to be altered to change the evaluation (perhaps "if [...]" would be more suitable). Anyway - give me some feedback and lets see if we can get you a little further.
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
compile git with openssl. To do this, run the following commands:
sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5
(Remember to replace 1.7.9.5 with the actual version of git in your system.)
Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.
Then build the package (if it's failing on test, you can remove the line TEST=test from the file debian/rules):
sudo dpkg-buildpackage -rfakeroot -b
Install new package:
x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb
Click to expand...
Click to collapse
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
ko_taka said:
my bash is 4.4.12
working directory had been set correctly
I removed the double [[ leaving a simple [ same with ]] closing brackets
it says Illegal option -t in line 238
this is line 238: read -r -p "6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
it also says [: Y: unexpected operator on line 243
this is line 243: if [ ! $PROMPT =~ ^[Yy]$ ]; then
Click to expand...
Click to collapse
Sounds like we're making progress. This is good. So, reading around the subject of square brackets vs double. It transpires converting the evaluations from double square brackets ([[..]]) to singles ([..]) may** change how variables are referenced. In my script I was forced to use double square brackets to correctly evaluate the response from the "read -r....." (read input) command (where it evaluates when upper or lower case Y is entered). If this command is changed from double square brackets to single ones the command then fails (on my setup). Further to this, in your reply it appears you're also having issues with the "read" command, for some reason your version doesn't support the -t directive (which waits for N seconds - ie: -t 5 will wait 5 seconds for user input).
For now the easiest thing to do is to remove *all* of the steps in the script that awaits input from the user to continue processing the script (they are non essential vanity items primarily used while I was building out the script). There are 7 is these in the script (look for "1/7", "2/7", "3/7", etc etc), just comment out (insert # at beginning of each line) for all 7 instances. There are ~10 lines per instance, examples of how instance #1 and #7 should look after editing is below. Just do the same for all 7 instances in your script and re run the script.
Code:
...
...
#PROMPT=""
#read -r -p "1/7. Initialise/Reinitialise Repo, first 'repo init' will take hours <Y/n>? (automatically continues unpromted after 5 seconds): " -t 5 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
...
#PROMPT=""
#read -r -p "7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): " -t 10 -e -i Y PROMPT
#echo
#if [ -z "$PROMPT" ]; then
# PROMPT="Y"
#fi
#if [[ ! $PROMPT =~ ^[Yy]$ ]]; then
# echo "Response: '$PROMPT', exiting!"
# exit 1
#fi
...
I'd be really interested in knowing what OS you're using (Ubuntu, Mac, etc along with version) perhaps I can use this detail to come up with a more generic version of the script.
Good luck, let me know how you get on.
ko_taka said:
Timte to time I was getting errors while fetching
TLS errors
I found it is due gnutls package and applied the following solution:
I'm using git-openssl build now
Just started the fetching process again
I'm under virtual machine on a host with a proper firewall configuration -- maybe that caused the connection problems while fetching
Click to expand...
Click to collapse
I'd also try changing the value of the variable: REPO_SYNC_THREADS in the script to something lower (more suitable to your internet bandwidth / performance), try 2 or 4 and build up from there. ie: REPO_SYNC_THREADS=2
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
applying packages_services_Telephony to packages/services/Telephony
./apply.sh: line 24: cd: /home/ferran/android/slimrom7/packages/services/Telephony: No such file or directory
6/7. Initialise environment for Build <Y/n>? (automatically continues unprompted after 10 seconds): Y
prepare device specific code...
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/samsung/kminilte/vendorsetup.sh
build/envsetup.sh: line 1716: vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
build/envsetup.sh: line 624: vendor/slim/build/tools/roomservice.py: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
cat: /home/ferran/android/slimrom7/vendor/slim/build/envsetup.sh: No such file or directory
build/core/product_config.mk:250: *** _nic.PRODUCTS.[[device/samsung/kminilte/slim.mk]]: "vendor/slim/config/common_full_phone.mk" does not exist. Stop.
** Don't have a product spec for: 'slim_kminilte'
** Do you have the right repo manifest?
running croot...
mka clean/clobber needed...
./build_slimrom7_kminilte.sh: line 257: mka: command not found
7/7. Build rom (this segment can take hours) <Y/n>? (automatically continues unprompted after 10 seconds): Y
running mka bacon...
./build_slimrom7_kminilte.sh: line 273: mka: command not found
Click to expand...
Click to collapse
ko_taka said:
I think the problem was on GIT .. confusing I think so
I would be waiting a message like (file doesnt exist or something like that)
anyway I still with compiling errors but now is quite different
I am using virtualbox (Xubuntu 17.10) on Mac OS 10.13.2 Mac Mini 2014 entry level
Click to expand...
Click to collapse
Thanks for the feedback. At first glance it looks to me like your issue is less to do with the script and more to do with not having all the source locally. Seeing commands such as running ./apply.sh (puled down with the source) error reporting "file not found" is the smoking gun.
Right now I'd be tempted to say ensure you've successfully pulled the primary SlimRom7 source locally. It may be easier to do this outside of the script by running the following:
Code:
$ cd /home/ferran/android/slimrom7/
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Keep an eye out of timeouts / 404 while it's syncing the repo's (the third of the three commands above). If you get errors just keep rerunning the "repo sync" command given above while in the correct directory until it completes without error. Once you have that done successfully, change the the build_scripts directory and re-run the script. If you see timeouts / 404 in the script output then you might have to manually run the "git clone" commands to see which one is causing the issue(s).
why does need that much space?
I was executing
$ repo forall -vc "git reset --hard" --quiet
$ repo sync --jobs="2"
Click to expand...
Click to collapse
I am getting the message "out of space"
80GB full of source code and even need more space??
ko_taka said:
why does need that much space?
I was executing
I am getting the message "out of space"
80GB full of source code and even need more space??
Click to expand...
Click to collapse
Use a disk usage analysis tool to find out whether earlier failed attempts pulled source down to multiple locations (when the script was failing).. I mentioned in an earlier post the size of the repo, look back 5 or 6 posts. Don't forget the bulk of the source will be contained in a hidden folder named /.repo/ check this folder doesn't exist outside of the build folder (/slimrom7/)...looking at earlier attempts I'd fist check your /build_scripts/ folder for the hidden .repo folder and if there delete it. Good luck
Although Aroma installer is great, development on it stopped a while ago and many devices aren't compatible with it. However the ability for selections in an installer hasn't been completely lost. You can use the volume keys to make selections through a couple different methods.
Note that this needs put into a shell script so either you need to have the updater-script call a shell script or use a dummy updater-script and have it in the update-binary
This combines both methods of volume key selection that I've stumbled across.
The one in the choose method is by @Chainfire and is from his VerifiedBootSigner zip.
The one in the chooseold method uses the keycheck binary by someone755. The original idea was by @Zappo here which I modified a bit to not use the timeout binary since it was a bit wonky when I tested it and to work with any volume key setup. I think the keycheck binary is arm compiled but not sure.
First thing that happens though is that it attempts to get the selection from the zip name. The user can add new or old to the zip (make sure there are no spaces) and skip the whole volume key thing (useful if neither vol key method works on their device - note that this won't work with tools like magisk manager which rename the zip to "install.zip" when flashing).
Second is that the keytest function is run. This is by me tests the chainfire method. One of his comments is that his method needs to be tested with older versions of android and sure enough, it doesn't work properly on many. So the keytest function tests the chainfire method and checks for an error. If there is no error, the installer will use the choose (chainfire) method. If there is an error, it'll use the chooseold (keycheck) method. I favor chainfire's because it's not reliant on a 3rd part binary that may not work with x86 and other devices with unusual cpu architectures
Third, the selection process is run. If using choose, the user makes their selection and the installer continues. If using chooseold, the installer will prompt the user to enter volume up, then volume down. This "programs" the vol keys for that device since it may vary between devices. Then the user makes their selection and the installer moves on.
Here's the code. At the bottom of it are 2 comments where you can put your stuff you want to have happen depending on the selection.
Code:
# Get option from zip name if applicable
case $(basename $ZIP) in
*new*|*New*|*NEW*) NEW=true;;
*old*|*Old*|*OLD*) NEW=false;;
esac
# Change this path to wherever the keycheck binary is located in your installer
KEYCHECK=$INSTALLER/keycheck
chmod 755 $KEYCHECK
keytest() {
ui_print "- Vol Key Test -"
ui_print " Press a Vol Key:"
(/system/bin/getevent -lc 1 2>&1 | /system/bin/grep VOLUME | /system/bin/grep " DOWN" > $INSTALLER/events) || return 1
return 0
}
choose() {
#note from chainfire @xda-developers: getevent behaves weird when piped, and busybox grep likes that even less than toolbox/toybox grep
while true; do
/system/bin/getevent -lc 1 2>&1 | /system/bin/grep VOLUME | /system/bin/grep " DOWN" > $INSTALLER/events
if (`cat $INSTALLER/events 2>/dev/null | /system/bin/grep VOLUME >/dev/null`); then
break
fi
done
if (`cat $INSTALLER/events 2>/dev/null | /system/bin/grep VOLUMEUP >/dev/null`); then
return 0
else
return 1
fi
}
chooseold() {
# Calling it first time detects previous input. Calling it second time will do what we want
$KEYCHECK
$KEYCHECK
SEL=$?
if [ "$1" == "UP" ]; then
UP=$SEL
elif [ "$1" == "DOWN" ]; then
DOWN=$SEL
elif [ $SEL -eq $UP ]; then
return 0
elif [ $SEL -eq $DOWN ]; then
return 1
else
ui_print " Vol key not detected!"
abort " Use name change method in TWRP"
fi
}
ui_print " "
if [ -z $NEW ]; then
if keytest; then
FUNCTION=choose
else
FUNCTION=chooseold
ui_print " ! Legacy device detected! Using old keycheck method"
ui_print " "
ui_print "- Vol Key Programming -"
ui_print " Press Vol Up Again:"
$FUNCTION "UP"
ui_print " Press Vol Down"
$FUNCTION "DOWN"
fi
ui_print " "
ui_print "- Select Option -"
ui_print " Choose which option you want installed:"
ui_print " Vol Up = New, Vol Down = Old"
if $FUNCTION; then
NEW=true
else
NEW=false
fi
else
ui_print " Option specified in zipname!"
fi
if $NEW; then
# insert stuff for new here
else
# insert stuff for old here
fi
Attached is the keycheck binary. The original source of it is here along with the timeout binary if you want to give that a go
If you want to have more than 2 selections, you can just add more selections by adding conditionals and calling $FUNCTION again. The V4A mod I help with here is a good example of this
If you have a device with a bixby button and want to use it or you have awk bundled in your installer and/or on target device (it's a part of busybox) and want to use an alternative getevent method, check out this post. Big thanks to @ianmacd
If you know of any other methods or of any improvements (since much of this is kind of hacky), let me know! I'll add it here :fingers-crossed:
Hey @Zackptg5, Ive been making a module that is kinda based entirely around this Volume key thing, not gonna give anything away just yet, but it requires a lot of choices to be made using the volume keys. Based on what the script above shows, the key inputs are tested for everytime you want to get an input, with the keytest function, then the choose port function is decided on that.
From the above code, for my device, the keytest would recognise the newer method and do that one the first time around, but whenever an input is required a second time, it would revert to the legacy ,ethod. Time consuming. So what I did was store tje exit status of the keytest function as a variable keytest_status, and always make a check against that variable whenever an input is needed.
For those with a modern keytest method, this would solve the function reverting to the legacy one. Check the attached file for a better description. I'm still working away so if i find anything else I'll let you know:good:
Also added a couple functions for size benefits etc
Sent from my OnePlus5T using XDA Labs
OldMid said:
Hey @Zackptg5, Ive been making a module that is kinda based entirely around this Volume key thing, not gonna give anything away just yet, but it requires a lot of choices to be made using the volume keys. Based on what the script above shows, the key inputs are tested for everytime you want to get an input, with the keytest function, then the choose port function is decided on that.
From the above code, for my device, the keytest would recognise the newer method and do that one the first time around, but whenever an input is required a second time, it would revert to the legacy ,ethod. Time consuming. So what I did was store tje exit status of the keytest function as a variable keytest_status, and always make a check against that variable whenever an input is needed.
For those with a modern keytest method, this would solve the function reverting to the legacy one. Check the attached file for a better description. I'm still working away so if i find anything else I'll let you know:good:
Also added a couple functions for size benefits etc
Sent from my OnePlus5T using XDA Labs
Click to expand...
Click to collapse
Not quite sure what you mean but the keytest function is only run once when the script is initially run to determine whether the new or old choose function should be used. It also looks like you based yours on v4a (the one in the OP here has been reworked a bit to make it easier/more efficient). Also changed it up a bit to make it easier for you, let me know if this does what you want
Zackptg5 said:
Not quite sure what you mean but the keytest function is only run once when the script is initially run to determine whether the new or old choose function should be used. It also looks like you based yours on v4a (the one in the OP here has been reworked a bit to make it easier/more efficient). Also changed it up a bit to make it easier for you, let me know if this does what you want
Click to expand...
Click to collapse
No attachement:laugh: What I meant was that it would to the legacy key programming function every second time an input was needed, and the normal one every first time.
It would:
Initial key programming
detect modern version and continue
if an input is required it would switch back to legacy method
switch back to modern when another input is needed
switch back to legacy again
repeat until no more inputs are needed and script is finished running. But this may also be because I'm using the old logic:silly:
Sent from my OnePlus5T using XDA Labs
OldMid said:
No attachement:laugh: What I meant was that it would to the legacy key programming function every second time an input was needed, and the normal one every first time.
It would:
Initial key programming
detect modern version and continue
if an input is required it would switch back to legacy method
switch back to modern when another input is needed
switch back to legacy again
repeat until no more inputs are needed and script is finished running. But this may also be because I'm using the old logic:silly:
Sent from my OnePlus5T using XDA Labs
Click to expand...
Click to collapse
Oh, that may be because of the old logic. Does that happen with the one I attached on the last post?
Zackptg5 said:
Oh, that may be because of the old logic. Does that happen with the one I attached on the last post?
Click to expand...
Click to collapse
I don't see anything attached
Sent from my OnePlus5T using XDA Labs
OldMid said:
I don't see anything attached
Sent from my OnePlus5T using XDA Labs
Click to expand...
Click to collapse
Sorry, forgot that xda doesn't like .sh files
Zackptg5 said:
Sorry, forgot that xda doesn't like .sh files
Click to expand...
Click to collapse
Yeah it fixes it:good:
Sent from my OnePlus5T using XDA Labs
HMMM... It doesn't work for me. I am trying to create a ZIP file to do some updates into the system requiring basic A/B selections. I am trying to implement this in a basic TWRP ZIP module. Have you managed to include it in a flashable ZIP file without Magisk? I could adapt V4A FX installer, but I don't want this to be a Unity module since it doesn't install anything. For some reason removing that unity thing is creating all the problem. Any clue?
Oki said:
HMMM... It doesn't work for me. I am trying to create a ZIP file to do some updates into the system requiring basic A/B selections. I am trying to implement this in a basic TWRP ZIP module. Have you managed to include it in a flashable ZIP file without Magisk? I could adapt V4A FX installer, but I don't want this to be a Unity module since it doesn't install anything. For some reason removing that unity thing is creating all the problem. Any clue?
Click to expand...
Click to collapse
I'll need to see it to find what the problem is. You can pm me if you don't want it public yet
Zackptg5 said:
I'll need to see it to find what the problem is. You can pm me if you don't want it public yet
Click to expand...
Click to collapse
I solved it using only the keycheck program. getevent was not working fine for me. You can download and inspect my code here.
This is my version:
Code:
#!/sbin/sh
ui_print() {
echo -n -e "ui_print $1\n" > /proc/self/fd/$OUTFD
echo -n -e "ui_print\n" > /proc/self/fd/$OUTFD
}
keytest() {
$KEYCHECK
KEYCODE=$?
if [ "$KEYCODE" = 42 ] ; then
return 0
else
return 1
fi
}
customkey() {
# Calling it first time detects previous input. Calling it second time will do what we want
$KEYCHECK
#$KEYCHECK
SEL=$?
if [ "$1" == "UP" ]; then
UP=$SEL
elif [ "$1" == "DOWN" ]; then
DOWN=$SEL
elif [ $SEL -eq $UP ]; then
return 0
elif [ $SEL -eq $DOWN ]; then
return 1
else
ui_print " Vol key not detected!"
abort " Use name change method in TWRP"
fi
}
##### THE PARTY STARTS HERE ########
# INITIAL CLEANUP
cd /tmp
rm -rf $INSTALLER 2>/dev/null
mkdir -p $INSTALLER
# extract files
ui_print "Extracting files."
cd $INSTALLER
unzip -o "$ZIP"
chmod 777 $KEYCHECK
ui_print " "
ui_print " #########################################"
ui_print " PROGRAM NAME"
ui_print " #########################################"
ui_print " "
ui_print " Welcome message"
ui_print " "
ui_print " Press Vol Up to continue..."
if keytest; then
FUNCTION=keytest
else
FUNCTION=customkey
ui_print " - Device detected! but using custom key method"
ui_print " "
ui_print " - Vol Key Programming -"
ui_print " Press Vol Up Again..."
$FUNCTION "UP"
ui_print " Press Vol Down..."
$FUNCTION "DOWN"
fi
# QUESTION 1 ##########
ui_print " - Continue?"
ui_print " Vol UP = YES, Vol DN = NO"
if ! $FUNCTION ; then
ui_print " "
ui_print " - Loser...."
exit 0
fi
# QUESTION 2 ##########
ui_print " "
ui_print " - Do you like this script?"
ui_print " Vol UP: YES / Vol DN: NO"
if $FUNCTION ; then
ui_print " - THANKS!!!!!"
else
ui_print " - I'm so sorry."
fi
# MORE QUESTIONS... ##########
Thanks!
Oki said:
I solved it using only the keycheck program. getevent was not working fine for me. You can download and inspect my code here.
This is my version:
Code:
#!/sbin/sh
ui_print() {
echo -n -e "ui_print $1\n" > /proc/self/fd/$OUTFD
echo -n -e "ui_print\n" > /proc/self/fd/$OUTFD
}
keytest() {
$KEYCHECK
KEYCODE=$?
if [ "$KEYCODE" = 42 ] ; then
return 0
else
return 1
fi
}
customkey() {
# Calling it first time detects previous input. Calling it second time will do what we want
$KEYCHECK
#$KEYCHECK
SEL=$?
if [ "$1" == "UP" ]; then
UP=$SEL
elif [ "$1" == "DOWN" ]; then
DOWN=$SEL
elif [ $SEL -eq $UP ]; then
return 0
elif [ $SEL -eq $DOWN ]; then
return 1
else
ui_print " Vol key not detected!"
abort " Use name change method in TWRP"
fi
}
##### THE PARTY STARTS HERE ########
# INITIAL CLEANUP
cd /tmp
rm -rf $INSTALLER 2>/dev/null
mkdir -p $INSTALLER
# extract files
ui_print "Extracting files."
cd $INSTALLER
unzip -o "$ZIP"
chmod 777 $KEYCHECK
ui_print " "
ui_print " #########################################"
ui_print " PROGRAM NAME"
ui_print " #########################################"
ui_print " "
ui_print " Welcome message"
ui_print " "
ui_print " Press Vol Up to continue..."
if keytest; then
FUNCTION=keytest
else
FUNCTION=customkey
ui_print " - Device detected! but using custom key method"
ui_print " "
ui_print " - Vol Key Programming -"
ui_print " Press Vol Up Again..."
$FUNCTION "UP"
ui_print " Press Vol Down..."
$FUNCTION "DOWN"
fi
# QUESTION 1 ##########
ui_print " - Continue?"
ui_print " Vol UP = YES, Vol DN = NO"
if ! $FUNCTION ; then
ui_print " "
ui_print " - Loser...."
exit 0
fi
# QUESTION 2 ##########
ui_print " "
ui_print " - Do you like this script?"
ui_print " Vol UP: YES / Vol DN: NO"
if $FUNCTION ; then
ui_print " - THANKS!!!!!"
else
ui_print " - I'm so sorry."
fi
# MORE QUESTIONS... ##########
Thanks!
Click to expand...
Click to collapse
I prefer the getevent one because it doesn't involve any binaries but it is more finicky than the keycheck method. Since your mod is for arm devices, keycheck should be fine. The keytest stuff all looks good except that in the keytest function, you probably would want it to be
Code:
if [ $KEYCODE -eq 42 ]; then
since it's integer comparison. You could keep as string the way you have it but you would need a '==' rather than a '='
Also, the keytest function doesn't program volume down key at all (it's typically 21). I just always use the custom key logic just in case there's that one weird device
Zackptg5 said:
I prefer the getevent one because it doesn't involve any binaries but it is more finicky than the keycheck method. Since your mod is for arm devices, keycheck should be fine. The keytest stuff all looks good except that in the keytest function, you probably would want it to be
Code:
if [ $KEYCODE -eq 42 ]; then
since it's integer comparison. You could keep as string the way you have it but you would need a '==' rather than a '='
Also, the keytest function doesn't program volume down key at all (it's typically 21). I just always use the custom key logic just in case there's that one weird device
Click to expand...
Click to collapse
I totally agree. I don't want to load the TWRP Zip with unnecessary tools. My problem was that for some reason the getevent method was colliding with some libraries in the implementation for my device, an Axon 7. So I decided to go this way. I would like to convert it to pure getevent method.
Regarding the comparison, you are right, I will have to change that. The link is the very first working version of the tool and there is a lot of code cleanup required. The tool I have developed is a TWRP Zip module that splits a vendor partition from system or userdata, so developers could create treblerized roms for legacy devices. I have an Axon 7, released with Android M, and we have now unofficial Android P, LOS 16.0 and a couple of treble roms supporting a lot of GSI. My objective is to make it as general and compatible as I could.
Thanks Again!
Zackptg5 said:
You could keep as string the way you have it but you would need a '==' rather than a '='
Click to expand...
Click to collapse
Actually, a single '=' is fine for string comparison, and is actually the only string comparison operator accepted by the [ and test commands of POSIX-compliant shells.
ianmacd said:
Actually, a single '=' is fine for string comparison, and is actually the only string comparison operator accepted by the [ and test commands of POSIX-compliant shells.
Click to expand...
Click to collapse
Thanks for the correction, guess a single '=' could work. However, Android shell isn't posix compliant. It's its own beast :/
Zackptg5 said:
Thanks for the correction, guess a single '=' could work. However, Android shell isn't posix compliant. It's its own beast :/
Click to expand...
Click to collapse
The Android shell nowadays is mksh, and yes, you're right, it isn't terribly POSIX-compliant, even when started with -o posix.
Just be aware that the '==' comparison operator doesn't work in some shells in combination with single brackets, whereas the single '=' always will. zsh, for example:
Code:
$ zsh -c '[ x = y ]'
$ zsh -c '[ x == y ]'
zsh:1: = not found
The single '=' predates '==' by quite a margin. The double '==' is best reserved for the double bracket command: [[
Anyway, I don't want to go too far off-topic. It's just that shells are an area of particular interest to me.
Thanks for starting this thread, by the way. I now user a modified version of this code in the installer of my S9/S9+ kernel, APGK, to allow the user to interactively select certain features at install-time. The only gotcha is that I have to manually mount /system to gain access to the getevent binary.
I prefer to pipe the output through awk and output only the penultimate field:
Code:
local key=$( getevent -lqc 1 | awk '{ print $(NF-1) }' )
And since the S9/S9+ also has a Bixby button, I add a line of code to return something more legible than the raw keycode when this is pressed:
Code:
[ $key = 02bf ] && key=KEY_BIXBY
Perhaps these details will be of some use to someone.
ianmacd said:
The Android shell nowadays is mksh, and yes, you're right, it isn't terribly POSIX-compliant, even when started with -o posix.
Just be aware that the '==' comparison operator doesn't work in some shells in combination with single brackets, whereas the single '=' always will. zsh, for example:
Code:
$ zsh -c '[ x = y ]'
$ zsh -c '[ x == y ]'
zsh:1: = not found
The single '=' predates '==' by quite a margin. The double '==' is best reserved for the double bracket command: [[
Anyway, I don't want to go too far off-topic. It's just that shells are an area of particular interest to me.
Thanks for starting this thread, by the way. I now user a modified version of this code in the installer of my S9/S9+ kernel, APGK, to allow the user to interactively select certain features at install-time. The only gotcha is that I have to manually mount /system to gain access to the getevent binary.
I prefer to pipe the output through awk and output only the penultimate field:
Code:
local key=$( getevent -lqc 1 | awk '{ print $(NF-1) }' )
And since the S9/S9+ also has a Bixby button, I add a line of code to return something more legible than the raw keycode when this is pressed:
Code:
[ $key = 02bf ] && key=KEY_BIXBY
Perhaps these details will be of some use to someone.
Click to expand...
Click to collapse
Good to know. I link this to the OP, thanks!
Sorry to revive an old thread but I need some help guys. I'm converting GSI's to flashable zips and for my custom stock rom installation, I want Xposed to be installed with Vol+ and not installed(updater-script continues) with Vol-. Also, i'll be using just the old method with keycheck. Any pointers on how I would accomplish that? Thanks much
Del
Optimization details:
Added double quotes around variables to handle potential issues with spaces in filenames.
Replaced the use of backticks with the $(command) syntax for command substitution.
Used the -q option with grep to suppress output and replaced /dev/null redirection.
Removed unnecessary calls to cat.
Simplified comparisons by directly using the variable values.
Removed redundant blank lines and unnecessary ui_print statements.
Bash:
# Get option from zip name if applicable
case $(basename "$ZIP") in
*[nN][eE][wW]*) NEW=true;;
*[oO][lL][dD]*) NEW=false;;
esac
# Change this path to wherever the keycheck binary is located in your installer
KEYCHECK="$INSTALLER/keycheck"
chmod 755 "$KEYCHECK"
keytest() {
ui_print "- Vol Key Test -"
ui_print " Press a Vol Key:"
/system/bin/getevent -lc 1 2>&1 | /system/bin/grep -q "VOLUME.* DOWN" > "$INSTALLER/events"
return $?
}
choose() {
ui_print "- Vol Key Programming -"
ui_print " Press Vol Up Again:"
$KEYCHECK
$KEYCHECK
SEL=$?
if [ "$1" == "UP" ]; then
UP=$SEL
elif [ "$1" == "DOWN" ]; then
DOWN=$SEL
elif [ "$SEL" -eq "$UP" ]; then
return 0
elif [ "$SEL" -eq "$DOWN" ]; then
return 1
else
ui_print " Vol key not detected!"
abort " Use name change method in TWRP"
fi
}
ui_print " "
if [ -z "$NEW" ]; then
if keytest; then
FUNCTION=choose
else
FUNCTION=chooseold
ui_print " ! Legacy device detected! Using old keycheck method"
ui_print " "
$FUNCTION "UP"
$FUNCTION "DOWN"
fi
ui_print " "
ui_print "- Select Option -"
ui_print " Choose which option you want installed:"
ui_print " Vol Up = New, Vol Down = Old"
if $FUNCTION; then
NEW=true
else
NEW=false
fi
else
ui_print " Option specified in zipname!"
fi
ui_print " "
if "$NEW"; then
# insert stuff for new here
else
# insert stuff for old here
fi
This is untested but since i am investigating into a new AROMA Replacement this might be interesting as alternative. I will play around with it later...