androidarmv6 20130402 (erickas) backlight - Samsung Galaxy Gio GT-S5660

Hi
I updated from I think 20130302 to the latest 20130402 androidarmv6 (erikcas) rom. Running great as always, but backlight does not work anymore. My old simple start script was:
Code:
echo 1 > /sys/class/misc/backlightnotification/enabled
but its obviously not there anymore:
Code:
localhost userinit.d # cat /sys/class/misc/backlightnotification/enabled
cat: can't open '/sys/class/misc/backlightnotification/enabled': No such file or directory
a search shows:
Code:
localhost userinit.d # find /sys | grep -i backligh
/sys/devices/platform/pmic-leds/leds/button-backlight
/sys/devices/platform/pmic-leds/leds/button-backlight/uevent
/sys/devices/platform/pmic-leds/leds/button-backlight/subsystem
/sys/devices/platform/pmic-leds/leds/button-backlight/device
/sys/devices/platform/pmic-leds/leds/button-backlight/brightness
/sys/devices/platform/pmic-leds/leds/button-backlight/max_brightness
/sys/devices/platform/pmic-leds/leds/button-backlight/power
/sys/devices/platform/pmic-leds/leds/button-backlight/power/wakeup
/sys/devices/platform/msm-battery/power_supply/battery/keypad_backlight
/sys/devices/platform/msm-battery/power_supply/battery/lcd_backlight
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight/uevent
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight/subsystem
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight/device
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight/brightness
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight/max_brightness
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight/power
/sys/devices/platform/msm_fb.196609/leds/lcd-backlight/power/wakeup
/sys/class/backlight
/sys/class/leds/lcd-backlight
/sys/class/leds/button-backlight
Hmmm. Any ideas?
Best Regards
K

Related

[Q] problem creating bootmenu

Hi guys i have a problem creating the bootmenu
I am following this post but when i'm going to 3rd line:
C:/> adb shell
$ su
# cp -R /sdcard/bootmenu /data/bootmenu
# cd /data/bootmenu
# chmod 755 *
# ./install.sh
# rm -R /data/bootmenu
i get the following message: cd: can't cd to /data/bootmenu
could you tell me please what i'm doing wrong???
Post the output of
# ls -l /data/bootmenu
Maybe it does not exist OR it is a file (it will be a file if /sdcard/bootmenu was one)
But in any case: It's much easier to install 2nd-init directly from the android market: The currently included version 0.45 works good enough to install the CM7 port (afterwards you'll have 0.51 anyway as the port includes it's own version)
pabx said:
Post the output of
# ls -l /data/bootmenu
Maybe it does not exist OR it is a file (it will be a file if /sdcard/bootmenu was one)
But in any case: It's much easier to install 2nd-init directly from the android market: The currently included version 0.45 works good enough to install the CM7 port (afterwards you'll have 0.51 anyway as the port includes it's own version)
Click to expand...
Click to collapse
Ok thanks! I saw today new version of this that include 0.5.1

[INFO] OpenVPN (tun.ko) for LG Tmobile Gslate

I just compiled a tun.ko and got OpenVPN working on the Tmobile Gslate! so I thought I would share:
1- Rooted (thanks to Chandon)
http://forum.xda-developers.com/showthread.php?t=1065882
2- Install tun.ko (Attached below)
download and unzip
Code:
adb remount
adb push tun.ko /system/lib/modules
adb shell
chmod 755 /system/lib/modules/tun.ko
Note: This tun module was built for kernel 2.6.36.3+
3- Install BusyBox using BusyBox Installer (from Market)
Install to /system/xbin
4- Install OpenVPN using OpenVPN Installer (from Market)
Install binary to /system/xbin
Install route to /system/xbin/bb
5- Install OpenVPN Settings (from Market)
6- Install OpenVPN static binary:
Download Static openvpn
Un-bz2 the file (7-Zip on Windows | bunzip2 on linux)
Code:
adb remount
adb push openvpn-static /system/xbin/openvpn
adb shell
chmod 555 /system/xbin/openvpn
7- Link Busybox ifconfig and route to /system/xbin/bb
Code:
adb shell
su
mkdir /system/xbin/bb
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
ln -s /system/xbin/route /system/xbin/bb/route
8- Setup OpenVPN Settings (from Market)
OpenVPN settings > Advanced > Load tun kernel module <- turn ON
OpenVPN settings > Advanced > TUN module settings
Load module using - insmod
Path to tun module - /system/lib/modules/tun.ko
9- copy your .conf files to /sdcard/openvpn
REBOOT
CONNECT!~
Extra for SMB mounters : Cifs.ko ! - Attached!
Edit: June 5 '11 - Extra for Asian users : nls_utf8.ko - Attached!
Well, I'm able to connect to my OpenVPN server now, but there must be something different in the binary..."client.conf: Connected" keeps spamming the notification area. Are you having this problem?
On a related note - I've got a couple other options, if I can get my cross-compiling tools set up correctly...I could use SonicWALL's NetExtender app, but that needs ppp_async and ppp_synctty built. I also wanted to be able to talk to a Windows-friendly PoPToP VPN server, but I suspect I'd need the ppp_mppe.ko built for that.
I tried compiling the whole kernel with the options I've mentioned, but I don't think I did it right...the make went all the way through, but I was using the gcc 4.4.3 eabi set in the SDK/NDK toolset. Since then, I've been trying to set things up according notes I found at K's Cluttered loft ( at triple-w dot (noob html limitation workaround) ailis.de/~k/archives/19-ARM-cross-compiling-howto dot HyperText Markup Language ) but start encountering problems when I try to build glibc...do you know of any instructions/tutorials which might help to educate this n00b (aye, that be me) in the fine art of ARM cross compiling?
bealesbane said:
Well, I'm able to connect to my OpenVPN server now, but there must be something different in the binary..."client.conf: Connected" keeps spamming the notification area. Are you having this problem?
On a related note - I've got a couple other options, if I can get my cross-compiling tools set up correctly...I could use SonicWALL's NetExtender app, but that needs ppp_async and ppp_synctty built. I also wanted to be able to talk to a Windows-friendly PoPToP VPN server, but I suspect I'd need the ppp_mppe.ko built for that.
I tried compiling the whole kernel with the options I've mentioned, but I don't think I did it right...the make went all the way through, but I was using the gcc 4.4.3 eabi set in the SDK/NDK toolset. Since then, I've been trying to set things up according notes I found at K's Cluttered loft ( at triple-w dot (noob html limitation workaround) ailis.de/~k/archives/19-ARM-cross-compiling-howto dot HyperText Markup Language ) but start encountering problems when I try to build glibc...do you know of any instructions/tutorials which might help to educate this n00b (aye, that be me) in the fine art of ARM cross compiling?
Click to expand...
Click to collapse
Yeah I have that spamming problem too .. always have with the honeycomb tablets.
I used 4.4.0 eabi, and had to hard code the localversion in the setlocalversion file and absolute path to the eabi modules in the makefile to get it to cross compile
I built and attached the ppp_async.ko , ppp_synctty.ko , ppp_mppe.ko for you (I did not test a insmod as I built and tested the cifs and tun on a friends tablet - do let me know if these work!)
That's great! Thanks for putting those together. All of the modules you created insert fine with insmod (this version of busybox still has an issue with modprobe running on this tablet, suspect may be related to self-referring parameter, but hope to experiment more later) with the exception of mppe. That one comes back with "insmod: init_module '/system/lib/modules/ppp_mppe.ko' failed (File exists)".
This, however, may not be due to the module itself, strictly speaking. The other two, which are presented by SonicWALL as a workaround to their proprietary VPN app, inserted fine, but still produce an I/O error when a connection is attempted...closer inspection of the app's log reveals a similar complaint under the hood:
06-01 08:01:36.848 I/NetExtender.ppp( 8207): Nxhelper: start pppd main routine
06-01 08:01:36.858 D/NetExtender.ppp( 8207): using channel 1
06-01 08:01:36.858 E/NetExtender.ppp( 8207): Couldn't create new ppp unit: File exists
06-01 08:01:36.858 I/NetExtender.ppp( 8207): Nxhelper: pppd hung up, notify the service
My off the wall guess, pending further investigation, is that inserting mppe, or trying to initialize the other two, results in an attempt to create a device handle which is not being properly enumerated? ( i.e., attempting to create an instance of /dev/ppp, which already exists, instead of a new handle, say, /dev/ppp0, ppp1, etc.) Again, just theorizing blindly at this point - but you've certainly given me a great deal to work with, and I say thank ya big big.
I'll update you with any progress I make here, but at least for the time being I still have basic connectivity to one of my networks, and I can do much with that. And the cifs module works a treat as well!
In the meantime, a simple script allows me to toggle the VPN on and off without being annoyed by the spamming...then I add a widget to the script using ScriptManager (from the market) and viola! Look ma, no hands!
Code:
#!/system/bin/sh
BB="/system/xbin/busybox"
VPN="/system/xbin/openvpn"
TUNDTL=`$BB ifconfig tun0 2>&1`
RESULT=$?
if [ $((RESULT)) -eq 1 ]; then
$VPN --config /mnt/sdcard/openvpn/client.conf --daemon MYVPN
else
VPNPID=`ps openvpn | grep "^root"`
VPNPID=`echo $VPNPID | cut -d" " -f2`
if [ $((VPNPID)) -gt 99 ]; then
$BB kill -KILL $VPNPID
fi
fi
exit
(Just for anyone who doesn't want to wait until OpenVPN Settings gets a bugfix for Honeycomb. Obviously, adjust locations as needed. Oh, and don't give the script a name that starts with "openvpn"...unless you WANT a kamikaze script. This simple script obviously wouldn't work for multiple tunnels, (if they're even supported), but it does ya fine for the basic config.)
awesome idea for the spamming .. sadly I have 8 openVPN servers I switch between so i have to put up with the spamming.. any idea what the reason of the spamming is? maybe contact the dev?
The source for the app is available at 'code.google.com/p/android-openvpn-settings'. The issue has been reported already by a few people (issue 70), but it looks like there are quite a few other issues reported, so no telling if or when Mr. Schäuffelhut will have a chance to review it. It seems like it would be a good starter project for a would-be contributor...I haven't done any java developing, but it seems like it would be easier to isolate our issue and tweak it than bloat my simple script to allow multiple PIDs to be tracked and toggled...though the latter is certainly possible, and after I get my second OpenVPN server online (Audiogalaxy offline for better part of day yesterday, need to make myself independent of that), if the Java is too daunting I just may do so. So many tempting projects, so little time.
Simple VPN handler script to tide us over until 0.4.8 or more in OpenVPN-Settings
Ok, since you were so kind as to compile those extra modules for me, I figure the least I can do is give you something in return. Here's a simple VPN handler to manage multiple tunnels. Filenames for config files are entered relative to the CFGS folder, and module load/remove is manual rather than auto...and I put in connection sharing, as I'm using it this way...but it'll certainly let you use as many tunnels as the kernel will let you work with.
As always, the standard, 'you take your life into your own hands if you use this code, not responsible for problems up to and including user death' disclaimer applies. It seems to be working for me, though I'm only using 2 VPN's ATM.
Good luck! (Will still let you know if I make any progress in Java Dev)
Code:
[email protected]: /data/local/bin > cat ./vpnhandler
#!/system/bin/sh
export BB="/system/xbin/busybox"
export VPN="/system/xbin/openvpn"
export MODS="/system/lib/modules"
export CFGS="/mnt/sdcard/openvpn"
export SPACES=" "
LOOPBACK=0
while [ $((LOOPBACK)) -eq 0 ]; do
LOOPBACK=1
CIFMOD=`$BB lsmod | grep -c "^cifs"`
if [ $((CIFMOD)) -eq 0 ]; then CIFMOD="Load"; else CIFMOD="Remove"; fi
TUNMOD=`$BB lsmod | grep -c "^tun"`
if [ $((TUNMOD)) -eq 0 ]; then TUNMOD="Load"; else TUNMOD="Remove"; fi
clear
echo "Simple VPN Handler"
echo "=================="
echo
echo "ACT # Tunnel Name Configuration File "
echo "--- --- -------------------- ------------------------------"
while read vpndefs; do
TUNNO=`echo "${vpndefs}" | cut -d"~" -f1`
TUNNAME=`echo "${vpndefs}" | cut -d"~" -f2`
TUNCFG=`echo "${vpndefs}" | cut -d"~" -f3`
TUNSTAT=`$BB ps w | grep openvpn | grep -c "\-\-daemon ${TUNNAME}\$"`
if [ $((TUNSTAT)) -eq 1 ]; then TUNSTAT="*"; else TUNSTAT=" "; fi
DISPLINE=" ${TUNSTAT} ${SPACES:0:$((3-${#TUNNO}))}${TUNNO} ${TUNNAME}${SPACES:0:$((22-${#TUNNAME}))}${TUNCFG}"
echo "${DISPLINE}"
done < "${CFGS}/cfglist"
echo
echo "_______________________________________________________________"
echo
echo " A - Add a new tunnel definition"
echo " D - Delete an existing tunnel "
echo " C - ${CIFMOD} CIFS Module "
echo " T - ${TUNMOD} TUN Module "
echo " S - Share tap0 to eth0 traffic "
echo " X - Break traffic forwarding "
echo " Q - Quit "
echo
echo -n " Select action, or a tunnel number to toggle on or off : "
read actkey
if [ "$actkey" = "C" -o "$actkey" = "c" ]; then
LOOPBACK=0
if [ "$CIFMOD" = "Load" ]; then
LOADMOD=`$BB insmod ${MODS}/cifs.ko 2>&1`
else LOADMOD=`/system/bin/toolbox rmmod cifs.ko 2>&1`
fi
fi
if [ "$actkey" = "T" -o "$actkey" = "t" ]; then
LOOPBACK=0
if [ "$TUNMOD" = "Load" ]; then
LOADMOD=`$BB insmod ${MODS}/tun.ko 2>&1`
else LOADMOD=`/system/bin/toolbox rmmod tun.ko 2>&1`
fi
fi
if [ "$actkey" = "S" -o "$actkey" = "s" ]; then
LOOPBACK=0
iptables -F; iptables -t nat -F; iptables -X; iptables -t nat -X
echo 1 | tee /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
fi
if [ "$actkey" = "X" -o "$actkey" = "x" ]; then
LOOPBACK=0
iptables -F; iptables -t nat -F; iptables -X; iptables -t nat -X
echo 0 | tee /proc/sys/net/ipv4/ip_forward
fi
if [ "$actkey" = "A" -o "$actkey" = "a" ]; then
LOOPBACK=0
echo; echo -n " Enter tunnel number to assign : "; read TUNNO
TUNCHK=`cat "${CFGS}/cfglist" | grep -c "^${TUNNO}~"`
if [ $((TUNCHK)) -eq 0 ]; then
echo; echo -n " Enter a name for the tunnel : "; read TUNNAME
echo; echo -n " Enter filepath/name for config file (relative to ${CFGS}) : "; read TUNCFG
echo "${TUNNO}~${TUNNAME}~${TUNCFG}" >> "${CFGS}/cfglist"
else echo -n " That number is already in use. "; read TUNNO
fi
fi
if [ "$actkey" = "D" -o "$actkey" = "d" ]; then
LOOPBACK=0
echo; echo -n " Enter tunnel number to delete : "; read TUNNO
TUNCHK=`cat "${CFGS}/cfglist" | grep -c "^${TUNNO}~"`
if [ $((TUNCHK)) -eq 0 ]; then
echo -n " That number is not currently in use. "; read TUNNO
else vpndefs=`cat "${CFGS}/cfglist" | grep "^${TUNNO}~"`
TUNNAME=`echo "${vpndefs}" | cut -d"~" -f2`
TUNSTAT=`$BB ps w | grep openvpn | grep -c "\-\-daemon ${TUNNAME}\$"`
if [ $((TUNSTAT)) -gt 0 ]; then
echo; echo -n " Tunnel is active. Turn off before deleting."; read TUNNO
else RESULT=`cat "${CFGS}/cfglist" | egrep -v "^${TUNNO}~" > "${CFGS}/cfglist.tmp"`
$BB mv -f "${CFGS}/cfglist.tmp" "${CFGS}/cfglist"
fi
fi
fi
if [ "$actkey" = "Q" -o "$actkey" = "q" ]; then LOOPBACK=0; fi
if [ $((LOOPBACK)) -eq 1 ]; then
TUNCHK=`cat "${CFGS}/cfglist" | grep -c "^${actkey}~"`
LOOPBACK=0
if [ $((TUNCHK)) -eq 0 ]; then
echo -n " That number is not currently in use. "; read TUNNO
else TUNNO="${actkey}"
vpndefs=`cat "${CFGS}/cfglist" | grep "^${TUNNO}~"`
TUNNAME=`echo "${vpndefs}" | cut -d"~" -f2`
TUNCFG=`echo "${vpndefs}" | cut -d"~" -f3`
TUNSTAT=`$BB ps w | grep openvpn | grep -c "\-\-daemon ${TUNNAME}\$"`
if [ $((TUNSTAT)) -gt 0 ]; then
VPNPID=`$BB ps w | grep openvpn | grep "\-\-daemon ${TUNNAME}"`
VPNPID=`echo $VPNPID | cut -d" " -f1`
if [ $((VPNPID)) -gt 99 ]; then
RESULT=`$BB kill -KILL $VPNPID`
fi
else RESULT=`$VPN --config "${CFGS}/${TUNCFG}" --daemon "${TUNNAME}"`
fi
fi
fi
if [ "$actkey" = "Q" -o "$actkey" = "q" ]; then LOOPBACK=1; fi
done
exit
Note: It'll throw out some screen errors if you don't have a zero length file in $CFGS/cfglist, but it'll let you add your first tunnel anyway. (Didn't bother to trap for that.)
Oh, and ScriptManager doesn't seem to like digging for scripts in /data/local/bin, but doesn't appear to have a problem executing things in /mnt/sdcard, even though I don't seem to be able to set the execute bit on any file in that fs. There's reference in Google of known glitch in some kernels that cause fs' mounted with the 'default_permissions,allow_other' flags to behave strangely. If they ever fix that, you may need to relocate, that's all.
Note also that the "ACT" column which denotes 'active' tunnels with an '*' only verifies that there is a process running with the designated label name. At this time, actual connectivity is left to you to determine.
it's very helpful, thanks very much!!
but could you compile nls_utf8.ko too? please
You should try and come up with a working recovery!
Sent from my LG-V909 using XDA Premium App
bealesbane said:
Ok, since you were so kind as to compile those extra modules for me, I figure the least I can do is give you something in return. Here's a simple VPN handler to manage multiple tunnels. Filenames for config files are entered relative to the CFGS folder, and module load/remove is manual rather than auto...and I put in connection sharing, as I'm using it this way...but it'll certainly let you use as many tunnels as the kernel will let you work with.
As always, the standard, 'you take your life into your own hands if you use this code, not responsible for problems up to and including user death' disclaimer applies. It seems to be working for me, though I'm only using 2 VPN's ATM.
Good luck! (Will still let you know if I make any progress in Java Dev....
Click to expand...
Click to collapse
Bealsbane way to go man, that is far more code than I could figure out! now i feel like i owe you a beer! haha .. I tried the code but it helps to have a gui currently .. i although do have alot of Java experience and possibly you and I could get a new OpenVPN Settings/Installer for gingerbread/honeycomb based devices!
once again thanks!
aureole999 said:
it's very helpful, thanks very much!!
but could you compile nls_utf8.ko too? please
Click to expand...
Click to collapse
Added to the first Post .. please test it and let me know if it works! good luck!
edit: tested by aureole999 and confirmed working
Excellent work ru1dev. I just added this thread to the G-Slate XDA bit.ly bundle. Would you mind if I posted a link to it over on G-SlateFans?
Bling_Diggity said:
Excellent work ru1dev. I just added this thread to the G-Slate XDA bit.ly bundle. Would you mind if I posted a link to it over on G-SlateFans?
Click to expand...
Click to collapse
Go ahead as long as it is a link back to the OP. Thanks for spreading the knowledge
please dont bash me as i know im a little off topic but hi everyone i have a major issue with my rooted gslate.if anyone can help it would be greatly appreciated. i downloaded cw from the market and when it askes you for compatibility i accedently chose the option (lg optimus 3d) thinking it was for my gslate and now after i turned off the gslate and go to turn it back on its stuck on LG blackscreen and says
[HasValidKernelImage] Magic value mismatch:
[DetectOperatingSystems]kernel image is invalid !!!
Starting Fastboot USB download protocol
Ive looked all over the internet and cant find anything to help me out so please can someone help me.
maybe a way to nvflash the proper kernel back.
tun.ko checksum
Hi guys, can anybody please post the md5sum output of the tun.ko? even though im using the same kernel, i cannot load the module on my g-slate. thanks
jomnoc said:
Hi guys, can anybody please post the md5sum output of the tun.ko? even though im using the same kernel, i cannot load the module on my g-slate. thanks
Click to expand...
Click to collapse
md5 - 3daf2d134dc2ae6c4a40fe3d8ac49344
Thanks! I have 6707fd6a79cc849d13e8dd4016f96028 .... ideas? can you upload your file? Thanks again
jomnoc said:
Thanks! I have 6707fd6a79cc849d13e8dd4016f96028 .... ideas? can you upload your file? Thanks again
Click to expand...
Click to collapse
yes that is the md5 for the tun.ko .. in a rush i gave you the md5 for the zip of the tun.ko previously. are you sure you are running kernel 2.6.36.3+
it has to be exactly that kernel..with the '+' on the end
yes i am. or i was haha.. it was a friend's tablet. but it certainly had that kernel version. thanks for the help. if i get it again i may ask for help

[Guide] Ubuntu Lucid 10.04 Defy CHROOT port

Ubuntu Lucid 10.04 android-vnc Defy port
{
"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"
}
THIS DOESNT MODIFY, REPLACE OR CHANGE YOUR CURRENT ROM OR ANDROID OS. IT RUNS IN CHROOT USING VNC, LIKE A VIRTUAL MACHINE! SO IT CANNOT BRICK OR HARM YOUR DEVICE!
Requirements :
Root and Busybox installed
At least 3.5GB free space on SD card
Android Terminal Emulator (Available on Play Store)
android-vnc-viewer (Available on Play Store)
Click to expand...
Click to collapse
Downloads :
Ubuntu image + scripts
ubuntu.sh script
*Froyo kernel scripts​
Click to expand...
Click to collapse
Installation guide
1. Download Ubuntu image from Downloads section
2. Extract Ubuntu 7-zip file contents to /sdcard/ubuntu
3. Download ubuntu.sh from attachments to /sdcard/ubuntu and replace the existing one
4. Start Terminal Emulator
5. Type in the following lines, each line is followed by enter (return) key, you'll need to run this only the first time :
su
cd /sdcard/ubuntu
sh ubuntu.sh
6. The Installation script starts and it creates necessary files and folders on internal memory, type in starttux
7. When the starttux command finishes, type in ui
8. Now you'll have to switch to android-vnc-viewer without closing Terminal Emulator (press home key to go to launcher and start vnc)
9. Setup VNC viewer :
password : 12345678
address : 127.0.0.1
port : 5901
color format : 24-bit color
10. Now press connect and Ubuntu GUI will start!
11. To exit Ubuntu GUI press menu while in vnc -> disconnect
12. Return to terminal emulator and type in killui
13. Type stoptux
14. Type exit
15. Type exit if Terminal is still opened, reboot device for proper unmount.
Click to expand...
Click to collapse
Video instalation guide :
http://www.youtube.com/watch?v=O9ercgiqwi0
Screenshot gallery :
Click to expand...
Click to collapse
Notes :
Tested on Defy CM10 2007+ by Quarx and HTC HD2 CM9 4.0.4 HWA build
I recommend using touchpad as input in vnc viewer
127.0.0.1 is known as localhost
If you have any errors post them here
The script can run without ubuntu.sh from downloads, but I recommend to replace it anyway
Credits : anantshri for image file
Soon I'll port Backtrack 5
Fell free to donate
Click to expand...
Click to collapse
F.A.Q
Q : Can this brick or harm my device?!
A : It simply can't cause it doesn't change anything inside your system!
Q : Is this a ROM or what?
A : THIS ISN'T A CUSTOM ROM! This is an image file that starts using Terminal and VNC (for gui), and it doesn't change or modify your system.
Just like a virtual machine.
Q : Can we use BT keyboard & mouse?
A : Yes.
Q : I've got problems with mouse/keyboard mapping, solution?
A : Open $HOME/.vnc/xstartup file with a text editor, and copy the text below :
Code:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#x-window-manager &
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
For noobs : "XKL_XMODMAP_DISABLE=1" fixes the mapping or wrong positioning the mouse.
Q : Can we use this for other devices than Defy?
A : The script supports ext4 module roms, so it should work on ICS (I've tested on Jelly Bean) and GB rooted devices.
To change the resolution (by default 850x480) type this into the terminal after starttux command :
Code:
vncserver -geometry 1280×800
1280x800 represents scren resolution, so if you use SGS3 e.g, use vncserver -geometry 1280x720
Q :Can this work on ARMv6?
A : I don't have an ARMv6 device, so I haven't tested it, I think that it may work pretty slow, but it should still work somehow.
So please, if anyone has ARMv6 based device, please test and report.
why not 12.04????
Enviado desde mi MB525 usando Tapatalk 2
Both 11.04 and 12.04 aren't supported on our CPU or it would be slow (their image files are way to big for my sd card)
I've also tried this on HTC HD2 and it works.
Tommorow expect Backtrack 5.
mihovil13 said:
Both 11.04 and 12.04 aren't supported on our CPU or it would be slow (their image files are way to big for my sd card)
I've also tried this on HTC HD2 and it works.
Tommorow expect Backtrack 5.
Click to expand...
Click to collapse
Pre-Installed 11.10 and 12.04 OMAP3/OMAP4 images...
https://wiki.ubuntu.com/ARM/OMAP
Thanks for the link, I'll try in cca 12h.
Also tommorow (in my time) I'll post a port of BT5 (I hope that this script could get it work)
Can wie use phone?
Sent from my MB526 using xda app-developers app
What phone?
Swyped off my Defy using Jelly Bean
Defy development is on fire these days....gonna try this in 10 days when I go home...!!!!!
Sent from my MB526 using xda app-developers app
Can I install and play linux games?
Is it possible to connect Bluetooth mouse and keyword?
Sent from my MB525 using xda app-developers app
Yes it is, I use BT mouse and keyboard, games are already installed.
I'll edit FAQ now
Updated second post with FAQ
mihovil13 said:
What phone?
Swyped off my Defy using Jelly Bean
Click to expand...
Click to collapse
The phone apk so can i telephone with this Rom...
Sent from my MB526 using xda app-developers app
Jojo1992 said:
The phone apk so can i telephone with this Rom...
Sent from my MB526 using xda app-developers app
Click to expand...
Click to collapse
Apparently you haven't read the OP.
This isn't a ROM, it's like a virtual machine inside your system.
Your ROM stays as it is, this starts using an app (VNC and Terminal)
Problem
I have followed all the steps in terminal but i get an error after i enter 'starttux'.
See the screenshot if u can help me,,, thank u
oxristsis said:
I have followed all the steps in terminal but i get an error after i enter 'starttux'.
See the screenshot if u can help me,,, thank u
Click to expand...
Click to collapse
Try changing the script files using Notepad++ to this (delete all the text and replace with this)
ubuntu.sh
Code:
echo " "
echo "Ubuntu Chroot v0.2-anant-netbook"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Script by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo "Xperia Customized by Anant shrivastava http://anantshri.info "
echo " "
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
echo "Cleaning up old Chunks . . ."
rm /system/bin/tuxcmd
rm /system/bin/starttux
rm /system/bin/stoptux
echo "Creating necessary directories"
if [ ! -d /data/local/mnt ]
then
mkdir /data/local/mnt
fi
#copy the files to places
echo "Setting up files"
cp -f starttux /system/bin
cp -f stoptux /system/bin
cp -f tuxcmd /system/bin
echo "Ubuntu is now configure!"
echo " "
echo "to Start ubuntu type 'starttux'"
echo "once ubuntu started use tuxcmd to gain shell"
echo "when you want to shutdown type 'stoptux'"
starttux
Code:
#Mount SYSTEM RW
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
#exporting useful variables
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
# Mounting Image to the farthest loop point
# FIXME : check if mount sucessfull otherwise abort whole process.
mknod /dev/block/loop255 b 7 255
busybox losetup /dev/block/loop255 $kit/ubuntu.img
busybox mount -t ext2 /dev/block/loop255 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
# Mounting SD Card inside the CHROOT
busybox mount -o bind /sdcard /data/local/mnt/sdcard
#seting environment
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo "Customized by Anant shrivastava http://anantshri.info"
echo "Ubuntu configured to use it just type 'tuxcmd'"
tuxcmd
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo "Customized by Anant shrivastava http://anantshri.info"
echo " "
busybox chroot $mnt /bin/bash
stoptux
Code:
#Cleanup
#After exit command is executed clear it all up
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
echo "Cleaning the Ubuntu leftover and returning back the memory to Android."
echo "by Anant Shrivastava http://anantshri.info "
echo "Shutting down Ubuntu"
sync
busybox umount -l $mnt/sdcard
busybox umount -l $mnt/dev/pts
busybox umount -l $mnt/proc
busybox umount -l $mnt/sys
busybox umount -l $mnt
busybox losetup -d /dev/block/loop255
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
echo " "
echo "Please reboot to properly unmount Ubuntu"
echo "Specially If you recieved an error before this line"
You maybe even don't have to go type tuxcmd after the starttux shell, if the shell changes to root:localhost automatically, then just type ui
update : I've managed to get BT5 working!!
Gnome shell 3 is working ?
Sent from my MB525 using xda premium
tarunyad said:
Gnome shell 3 is working ?
Sent from my MB525 using xda premium
Click to expand...
Click to collapse
is not avaliable for ubuntu 10.04, so no gnome shell 3...
Yes but there's gnome preinstalled in the image
Swyped off my Defy using Jelly Bean

bq Aquaris E4.5 Ubuntu Edition - Kernel

How to enable NFSD, CIFS or V4L in the Kernel?
Code:
zcat /proc/config.gz | grep NFSD
zcat /proc/config.gz | grep CIFS
zcat /proc/config.gz | grep V4L
shows me, it is not enabled.
Kernel Sources you can find on
aquaris-E4.5-ubuntu-master
I tried to edit for exp.:
~/aquaris-E4.5/mediatek/config/krillin/autoconfig/kconfig/project
with
Code:
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
CONFIG_PNFS_FILE_LAYOUT=y
CONFIG_PNFS_BLOCK=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="y"
CONFIG_ROOT_NFS=y
# CONFIG_NFS_FSCACHE is not set
CONFIG_NFS_USE_LEGACY_DNS=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_FAULT_INJECTION=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_SUNRPC_BACKCHANNEL=y
but I get errors with
Code:
./makeMtk -t krillin n k
Any ideas?

[ROM][5.1][20150708] CyanogenMOD 12.1 [UNOFFICIAL]

Official CM 12.1 nightlies for flounder have arrived and can be found here:
http://download.cyanogenmod.org/?device=flounder
Changelog should soon be found here:
http://www.cmxlog.com/12.1/flounder/#
My work is done, thank you all!
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Click to expand...
Click to collapse
As there are so far no official CM12.1 nightlies for our Nexus 9 I want to share my builds. I am just building, all credits go to the developers and the CM12.1 team. Building will be done several times a week (nearly daily) and can be found here:
Download: https://www.androidfilehost.com/?w=files&flid=32977
Latest build: 20150708 https://www.androidfilehost.com/?fid=24052804347770338
Changelog: http://review.cyanogenmod.org/#/q/status:merged+branch:cm-12.1,n,z
Note: Not all nightly builds will be tested before uploading, so only flash, if you really know what you do and how to handle a bootloop or whatever could happen... I am not responsable for your bricked or imploded device! In general I test my builds on my volantisg (a.k.a. flounder_lte) but they should also work on the non-lte flounder. Please test for yourself...
For suitable GAPPs have a look here: http://forum.xda-developers.com/nexus-9/themes-apps/gapps-20150223-flounder-t3038452
I use these gapps: http://forum.xda-developers.com/showthread.php?t=3038452
A fix for the build.prop variety which causes showing of following notification after (re-)booting
There's an internal problem with your device. Contact your manufacturer for details.
Click to expand...
Click to collapse
was brought to us by gladiac and can be found here [FIX] build.prop variety fix (aka contact manufacturer problem). All credits to gladiac, works like a charme for me....
CREDITS
CM Team
SimonSickle
Joshua
HCDRJacob
Hima-Dev
cdesai
bynarie
dcrin3
smac0628
gladiac for build.prop variety fix
If I should miss someone, please give me a hint.
reserved
#3
Working well. Haven't tested everything, but like it so far.
Sent from my Nexus 9 using Tapatalk
New build is up: https://www.androidfilehost.com/?fid=24052804347757511
Is this rom for LTE to?
Torparn said:
Is this rom for LTE to?
Click to expand...
Click to collapse
diskoteer said:
Note: ... In general I test my builds on my volantisg (a.k.a. flounder_lte) but they should also work on the non-lte flounder. Please test for yourself...
Click to expand...
Click to collapse
fleischbanane said:
Click to expand...
Click to collapse
Ok thanks I will try it out.
New build is up: https://www.androidfilehost.com/?fid=24052804347757782
Changelog:
- Synced CM tree. See http://review.cyanogenmod.org/#/q/status:merged+branch:cm-12.1,n,z
Click to expand...
Click to collapse
I have seen no flounder specific commit.
By the way the last flounder specific commit I noticed was Simon Sickle's kernel config update: http://review.cyanogenmod.org/#/c/100324/. Works very well for me, thank you a lot, Simon Sickle!!!
diskoteer said:
New build is up: https://www.androidfilehost.com/?fid=24052804347757782
I have seen no flounder specific commit.
By the way the last flounder specific commit I noticed was Simon Sickle's kernel config update: http://review.cyanogenmod.org/#/c/100324/. Works very well for me, thank you a lot, Simon Sickle!!!
Click to expand...
Click to collapse
Hi diskoteer,
does your build compile bcopy.c into libc? There are some apps out there, like firefox, that use bcopy. They all wont start without bcopy. This fix did not work in my builds for some reason so I had to force the inclusion by removing the ifeq in line 79 of bionic/libc/arch-arm/arm.mk. You can test if bcopy works in your builds by starting firefox. If it crashes and the error report screen appears it does not work.
Tried to update from the official CM12 nightlys but after the first boot there was an message wich told me that I have to contact the manufactorer. After restoring my CM12 nightly everything works fine.
Wiped system and flashed the last build + new gapps for Android 5.1, but no luck.
It's only an information for other people who want to dirty flash over CM12.
fleischbanane said:
Tried to update from the official CM12 nightlys but after the first boot there was an message wich told me that I have to contact the manufactorer. After restoring my CM12 nightly everything works fine.
Wiped system and flashed the last build + new gapps for Android 5.1, but no luck.
It's only an information for other people who want to dirty flash over CM12.
Click to expand...
Click to collapse
This message is harmless. It is solely a check that google implemented in Android 5.1 that compares /system/build.prop with the values found in /vendor/build.prop. If they differ you get that error message. All you need to do to get rid of the error is to change the 3 values in /vendor/build.prop according to the values in /system/build.prop.
fleischbanane said:
Tried to update from the official CM12 nightlys but after the first boot there was an message wich told me that I have to contact the manufactorer.
Click to expand...
Click to collapse
This is a known problem and has something to do with build.prop in /vendor and /system. For details have a look here: http://forum.xda-developers.com/showpost.php?p=60695940&postcount=37 in dcrin3's thread. I for myself have not changed anything in build.prop, I am clicking "ok" in this message, it is just a notice. Everything works fine...
Does anyone is in need for the 5.1.1 bootloader or vendor.img?
Hi,
diskoteer said:
This is a known problem and has something to do with build.prop in /vendor and /system. For details have a look here: http://forum.xda-developers.com/showpost.php?p=60695940&postcount=37 in dcrin3's thread. I for myself have not changed anything in build.prop, I am clicking "ok" in this message, it is just a notice. Everything works fine...
Does anyone is in need for the 5.1.1 bootloader or vendor.img?
Click to expand...
Click to collapse
I just didn't like seeing the popup message on every boot so I created a script to generate a modified vendor image based on the factory image with the properties fixed to match the ones of the ROM being used. If you flash the vendor partition with the image this script produces for your CM 12.1 snapshot ROM, the dialog is gone. Please read the comments on the script for more info.
Code:
#!/bin/sh
# Author: Tuomas Jormola <[email protected]>
# License: Public Domain
#
# This script modifies the factory vendor image from Google to be used with
# CM 12.1 on Nexus 9. By flashing the modified vendor image you can get rid
# of the "There's an internal problem with your device. Contact your
# manufacturer for details" popup displayed on device startup.
#
# The script was developed and tested on Ubuntu 15.04 vivid system. The script
# requires bsdtar and sparse image tools from Google. For Ubuntu/Debian based
# distros you can install the following packages to fulfil the dependencies:
# bsdtar android-tools-fsutils
#
# In order to make the image you need to download the Android 5.1.x factory
# image archive for you device from Google at
# https://developers.google.com/android/nexus/images
# or use these direct links for 5.1.1 LMY47X build
#
# "volantisg" for Nexus 9 (LTE):
# https://dl.google.com/dl/android/aosp/volantisg-lmy47x-factory-0adc3016.tgz
#
# "volantis" for Nexus 9 (Wi-Fi):
# https://dl.google.com/dl/android/aosp/volantis-lmy47x-factory-3efdc8d4.tgz
#
# Then you need a CM 12.1 snapshot ROM image. No official CM 12.1 snapshots
# exists as time of writing so you need to build it on your own or find
# some pre-built snapshot somewhere, see e.g.
# http://forum.xda-developers.com/nexus-9/development/rom-cyanogenmod-12-1-t3129778
#
# Now run the script as root, for example:
#
# sudo bash /path/to/make-vendor-image.sh /path/to/volantisg-lmy47x-factory-0adc3016.tgz /path/to/cm-12.1-20150610-UNOFFICIAL-flounder.zip /path/to/modified-vendor-image-from-volantis-lmy47x-for-cm-12.1-20150610-UNOFFICIAL-flounder.img
#
# You can the flash the modified vendor image to the device with fastboot.
# Boot the device to bootloader, connect the device with a USB cable to the
# Linux machine and issue the command
#
# fastboot flash vendor /path/to/modified-vendor-image-from-volantis-lmy47x-for-cm-12.1-20150610-UNOFFICIAL-flounder.img
#
# You have to re-create and re-flash the vendor image each time you flash a
# new build of CM 12.1.
usage() {
echo "Usage: $0 FACTORY_IMAGE_TARBALL CM_ROM_ZIP NEW_VENDOR_IMAGE_FILE"
}
set -e
set -o verbose
set -o xtrace
if test "`id -u`" != 0; then
echo "This script needs to be run as root" 1>&2
exit 1
fi
FACTORY_IMAGE_TARBALL="$1"
CM_ROM_ZIP="$2"
NEW_VENDOR_IMAGE_FILE="$3"
case "$FACTORY_IMAGE_TARBALL" in
volantis*-*-factory-*.tgz)
PRODUCT="`echo $FACTORY_IMAGE_TARBALL | cut -d- -f1`"
BUILD="`echo $FACTORY_IMAGE_TARBALL | cut -d- -f2`"
;;
*)
echo "Invalid factory image tarball" 1>&2
usage
exit 1
;;
esac
if test -z "$CM_ROM_ZIP"; then
echo "No CM ROM zip file given" 1>&2
usage
exit 1
fi
if ! test -r "$CM_ROM_ZIP"; then
echo "CM ROM zip file not readable" 1>&2
usage
exit 1
fi
if test -z "$NEW_VENDOR_IMAGE_FILE"; then
echo "No new vendor image file given" 1>&2
usage
exit 1
fi
TEMP_DIR="`mktemp -d `"
bsdtar vxf "$CM_ROM_ZIP" -C "$TEMP_DIR" system/build.prop
BUILD_FINGERPRINT="`grep 'ro\.build\.fingerprint=' $TEMP_DIR/system/build.prop | cut -d= -f2`"
BUILD_DATE_UTC="`grep 'ro\.build\.date\.utc=' $TEMP_DIR/system/build.prop | cut -d= -f2`"
BUILD_DATE_STR="`LC_ALL=C LC_TIME=C date -ud @$BUILD_DATE_UTC`"
bsdtar xzOf "$FACTORY_IMAGE_TARBALL" "$PRODUCT-$BUILD/image-$PRODUCT-$BUILD.zip" | bsdtar xf - -C "$TEMP_DIR" vendor.img
simg2img "$TEMP_DIR/vendor.img" "$TEMP_DIR/vendor.raw"
mkdir "$TEMP_DIR/mnt"
mount -o loop "$TEMP_DIR/vendor.raw" "$TEMP_DIR/mnt"
perl -pne"s{^(ro\\.vendor\\.build\\.fingerprint)=.+$}{\$1=$BUILD_FINGERPRINT}" -i "$TEMP_DIR/mnt/build.prop"
perl -pne"s{^(ro\\.vendor\\.build\\.date)=.+$}{\$1=$BUILD_DATE_STR}" -i "$TEMP_DIR/mnt/build.prop"
perl -pne"s{^(ro\\.vendor\\.build\\.date\.utc)=.+$}{\$1=$BUILD_DATE_UTC}" -i "$TEMP_DIR/mnt/build.prop"
umount "$TEMP_DIR/mnt"
img2simg "$TEMP_DIR/vendor.raw" "$NEW_VENDOR_IMAGE_FILE"
rm -rf "$TEMP_DIR"
gladiac said:
Hi diskoteer,
does your build compile bcopy.c into libc? There are some apps out there, like firefox, that use bcopy. They all wont start without bcopy. This fix did not work in my builds for some reason so I had to force the inclusion by removing the ifeq in line 79 of bionic/libc/arch-arm/arm.mk. You can test if bcopy works in your builds by starting firefox. If it crashes and the error report screen appears it does not work.
Click to expand...
Click to collapse
Actuallly I do not know. I don't use firefox, maybe someone who use it can test it? Is there any way to test for bcopy from terminal?
New build up: https://www.androidfilehost.com/?fid=24052804347758256
Changelog:
- Synced CM tree
Click to expand...
Click to collapse
tjormola said:
Hi,
I just didn't like seeing the popup message on every boot so I created a script to generate a modified vendor image based on the factory image with the properties fixed to match the ones of the ROM being used. If you flash the vendor partition with the image this script produces for your CM 12.1 snapshot ROM, the dialog is gone. Please read the comments on the script for more info.
Code:
#!/bin/sh
# Author: Tuomas Jormola <[email protected]>
# License: Public Domain
#
# This script modifies the factory vendor image from Google to be used with
# CM 12.1 on Nexus 9. By flashing the modified vendor image you can get rid
# of the "There's an internal problem with your device. Contact your
# manufacturer for details" popup displayed on device startup.
#
# The script was developed and tested on Ubuntu 15.04 vivid system. The script
# requires bsdtar and sparse image tools from Google. For Ubuntu/Debian based
# distros you can install the following packages to fulfil the dependencies:
# bsdtar android-tools-fsutils
#
# In order to make the image you need to download the Android 5.1.x factory
# image archive for you device from Google at
# https://developers.google.com/android/nexus/images
# or use these direct links for 5.1.1 LMY47X build
#
# "volantisg" for Nexus 9 (LTE):
# https://dl.google.com/dl/android/aosp/volantisg-lmy47x-factory-0adc3016.tgz
#
# "volantis" for Nexus 9 (Wi-Fi):
# https://dl.google.com/dl/android/aosp/volantis-lmy47x-factory-3efdc8d4.tgz
#
# Then you need a CM 12.1 snapshot ROM image. No official CM 12.1 snapshots
# exists as time of writing so you need to build it on your own or find
# some pre-built snapshot somewhere, see e.g.
# http://forum.xda-developers.com/nexus-9/development/rom-cyanogenmod-12-1-t3129778
#
# Now run the script as root, for example:
#
# sudo bash /path/to/make-vendor-image.sh /path/to/volantisg-lmy47x-factory-0adc3016.tgz /path/to/cm-12.1-20150610-UNOFFICIAL-flounder.zip /path/to/modified-vendor-image-from-volantis-lmy47x-for-cm-12.1-20150610-UNOFFICIAL-flounder.img
#
# You can the flash the modified vendor image to the device with fastboot.
# Boot the device to bootloader, connect the device with a USB cable to the
# Linux machine and issue the command
#
# fastboot flash vendor /path/to/modified-vendor-image-from-volantis-lmy47x-for-cm-12.1-20150610-UNOFFICIAL-flounder.img
#
# You have to re-create and re-flash the vendor image each time you flash a
# new build of CM 12.1.
usage() {
echo "Usage: $0 FACTORY_IMAGE_TARBALL CM_ROM_ZIP NEW_VENDOR_IMAGE_FILE"
}
set -e
set -o verbose
set -o xtrace
if test "`id -u`" != 0; then
echo "This script needs to be run as root" 1>&2
exit 1
fi
FACTORY_IMAGE_TARBALL="$1"
CM_ROM_ZIP="$2"
NEW_VENDOR_IMAGE_FILE="$3"
case "$FACTORY_IMAGE_TARBALL" in
volantis*-*-factory-*.tgz)
PRODUCT="`echo $FACTORY_IMAGE_TARBALL | cut -d- -f1`"
BUILD="`echo $FACTORY_IMAGE_TARBALL | cut -d- -f2`"
;;
*)
echo "Invalid factory image tarball" 1>&2
usage
exit 1
;;
esac
if test -z "$CM_ROM_ZIP"; then
echo "No CM ROM zip file given" 1>&2
usage
exit 1
fi
if ! test -r "$CM_ROM_ZIP"; then
echo "CM ROM zip file not readable" 1>&2
usage
exit 1
fi
if test -z "$NEW_VENDOR_IMAGE_FILE"; then
echo "No new vendor image file given" 1>&2
usage
exit 1
fi
TEMP_DIR="`mktemp -d `"
bsdtar vxf "$CM_ROM_ZIP" -C "$TEMP_DIR" system/build.prop
BUILD_FINGERPRINT="`grep 'ro\.build\.fingerprint=' $TEMP_DIR/system/build.prop | cut -d= -f2`"
BUILD_DATE_UTC="`grep 'ro\.build\.date\.utc=' $TEMP_DIR/system/build.prop | cut -d= -f2`"
BUILD_DATE_STR="`LC_ALL=C LC_TIME=C date -ud @$BUILD_DATE_UTC`"
bsdtar xzOf "$FACTORY_IMAGE_TARBALL" "$PRODUCT-$BUILD/image-$PRODUCT-$BUILD.zip" | bsdtar xf - -C "$TEMP_DIR" vendor.img
simg2img "$TEMP_DIR/vendor.img" "$TEMP_DIR/vendor.raw"
mkdir "$TEMP_DIR/mnt"
mount -o loop "$TEMP_DIR/vendor.raw" "$TEMP_DIR/mnt"
perl -pne"s{^(ro\\.vendor\\.build\\.fingerprint)=.+$}{\$1=$BUILD_FINGERPRINT}" -i "$TEMP_DIR/mnt/build.prop"
perl -pne"s{^(ro\\.vendor\\.build\\.date)=.+$}{\$1=$BUILD_DATE_STR}" -i "$TEMP_DIR/mnt/build.prop"
perl -pne"s{^(ro\\.vendor\\.build\\.date\.utc)=.+$}{\$1=$BUILD_DATE_UTC}" -i "$TEMP_DIR/mnt/build.prop"
umount "$TEMP_DIR/mnt"
img2simg "$TEMP_DIR/vendor.raw" "$NEW_VENDOR_IMAGE_FILE"
rm -rf "$TEMP_DIR"
Click to expand...
Click to collapse
Thank you very much for the script, but i'm on Windows and it would be very nice if you can upload the modified vendor.img, so I don't have to set up a VM with all this stuff.
Edit: Flashed the latest build and new gapps for 12.1 over CM12 and everything works perfect, except the warning. But now I know that it's not a big thing and ignore it. :good:
fleischbanane said:
Thank you very much for the script, but i'm on Windows and it would be very nice if you can upload the modified vendor.img, so I don't have to set up a VM with all this stuff.
Click to expand...
Click to collapse
Sorry, I'm not the maintainer of the ROM in this thread and I don't use it myself (I'm compiling my own CM 12.1 snapshots until the official Nexus 9 build is upgraded to 12.1) so I'd rather not try to maintain something that isn't completely under my control. Maybe @diskoteer would like to build and maintain the Wi-Fi and LTE vendor images for his ROM built using this script?
tjormola said:
Sorry, I'm not the maintainer of the ROM in this thread and I don't use it myself (I'm compiling my own CM 12.1 snapshots until the official Nexus 9 build is upgraded to 12.1) so I'd rather not try to maintain something that isn't completely under my control. Maybe @diskoteer would like to build and maintain the Wi-Fi and LTE vendor images for his ROM built using this script?
Click to expand...
Click to collapse
Well, the problem is that the values in build.prop are different in every build. This is why we would have to deliver a vendor image for every new build too. That's not very maintainable. IMHO we should mount /vendor and generate /vendor/build.prop from the information found in /system/build.prop at installation-time of the rom.
//edit:
Something like this would suffice:
Code:
grep -E "^ro\.build\.(date(\.utc)?|fingerprint)=" /system/build.prop |sed -e"s/^ro\./ro.vendor./" > /vendor/build.prop
gladiac said:
Well, the problem is that the values in build.prop are different in every build. This is why we would have to deliver a vendor image for every new build too. That's not very maintainable. IMHO we should mount /vendor and generate /vendor/build.prop from the information found in /system/build.prop at installation-time of the rom.
//edit:
Something like this would suffice:
Code:
grep -E "^ro\.build\.(date(\.utc)?|fingerprint)=" /system/build.prop |sed -e"s/^ro\./ro.vendor./" > /vendor/build.prop
Click to expand...
Click to collapse
Thanks for the feedback. I didn't know it would be so difficult, but the message is no big thing... till my wife will see it the first time. [emoji2]

Categories

Resources