Z5 Premium AOSP
This rom is just AOSP build with Sony sources for Z5 premium. Not everything works perfectly.
Download: Download
== Installation ==
Flash all files via fastboot:
- fastboot flash boot boot.img
- fastboot boot boot-recovery.img
- enter recovery with volume up, advanced wipe: data, cache, dalvik cache
- flash or adb sideload the aosp.zip
- flash or adb sideload gapps and/or supersu
- Reboot
Enjoy!
XDA:DevDB Information
Sony Z5 Premium pure AOSP 7.0 Nougat, ROM for the Sony Xperia Z5 Premium
Contributors
krabappel2548
Source Code: https://github.com/xperia-aosp-project
ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.10.x
Based On: AOSP
Version Information
Status: Beta
Current Stable Version: 1.0
Stable Release Date: 2016-09-19
Created 2016-04-02
Last Updated 2016-09-19
Hi, know you from the Xperia S days! Thanks for your work. Would it be possible to add what's not working as intended?
K,
okay,
What's working, with the exception of NFC and Communications which i can't test as I have no sim installed or alternate device to test NFC.
NOTE: I did not flash userdata.img
Tunes :good:
Bluetooth Pairing :good: , no tethering for wifi, but then again I'm probably doing that wrong.
currently there is no app or filemanager with a transfer function so i can't test file transfer.
Rotation :good:
ADB :good:
Storage, external :good: , Exfat support needed [kernel]
Code:
adb shell cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev cpuset
nodev tmpfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev configfs
nodev devpts
ext3
ext2
ext4
nodev ramfs
vfat
fuseblk
nodev fuse
nodev fusectl
nodev pstore
nodev selinuxfs
nodev functionfs
Wifi , kind of mixed, I use mac filters on my router, when trying to connect with this rom connection fails.
mac address in this rom is different. After adding new mac, connection is go.
Youtube playback via browser is good. So video and audio playback are good.
Mic is up :good: Recording audio is good to go.
Cameras are janky, but well, yeah. :silly: Video recording DOES function though, the colors are all porked and images are backwards/flipped and off color, Note this is using opencamera and not default, default is porky.
Booting/rebooting , you don't have the sony init set up properly so no button trigger/ led functions to boot to FOTAKernel/recovery.
That's what i have so far. Didn't do the GAPPS test as per note on booting/rebooting.
m
Edit: Please post your specific sources if different from current offerings including any build system patches? Thanks.
krabappel2548 said:
- fastboot flash recovery recovery.img
Click to expand...
Click to collapse
Tried that (recovery.img) with the Z5 and it wouldn't work,
also there's some issue if you use the twrp recovery script to boot to TWRP via volume-button pressing during bootup - also didn't work - which was weird
moonbutt74 said:
[snip]
Storage, external :good: , Exfat support needed [kernel]
[snip]
Click to expand...
Click to collapse
not only that - it needs support in the ROM, I tried a kernel with exfat included and it still insisted to format the microSD with FAT32,
being formatted with exFAT - it said that it's corrupted and wouldn't recognized or automount it
This is ridiculous - using a patent encumbered filesystem as a default which can't be used with the default system (AOSP) :silly:
Who cares about Microsoft's filesystems ? They should have used ext4 with some minor changes, reiserfs, reiser4, etc. instead,
it's not like you access the microSD directly via usb-storage functionality like in the good ol' days, it's through MTP anyway ...
moonbutt74 said:
Wifi , kind of mixed, I use mac filters on my router, when trying to connect with this rom connection fails.
mac address in this rom is different. After adding new mac, connection is go.
Click to expand...
Click to collapse
Afaik there's a MAC address jumbling functionality in the Kernel that does this,
after a reboot it should fail for you again
moonbutt74 said:
Cameras are janky, but well, yeah. :silly: Video recording DOES function though, the colors are all porked and images are backwards/flipped and off color, Note this is using opencamera and not default, default is porky.
Click to expand...
Click to collapse
yeah, had the same experience, that was terrible
moonbutt74 said:
Booting/rebooting , you don't have the sony init set up properly so no button trigger/ led functions to boot to FOTAKernel/recovery.
Click to expand...
Click to collapse
Even when using the recovery script it didn't work for me - but perhaps on another revisit it might work with some changes - dunno
Besides that ... yeah, had similar experiences - it was rather stable so actually usable as a daily driver (aside from the camera, FM radio, etc.)
Bootrec stuff
Z,
Code:
also there's some issue if you use the twrp recovery script to boot to TWRP via volume-button pressing during bootup - also didn't work - which was weird
okay this is the bootimage repacked with bootrec setup, straight from androplus ramdisk setup aosp_z5p_boot.img
here's just the bootrec directory and init shortcut, unpack, rename init in ramdisk to init.real then extract zip, paste this directory [bootrec] and the init shortcut in.
check properties on the init shortcut to make sure it's pointing to /init bootrec.zip
and the recoveryimage you want is the twrp build for z5p
that should be it it worked for me just fine.
m
K, Z,
Quick note, the mac address in "stock" MM does not randomize. Meaning mac filter entry in router remains valid/correct across reboot.
So this is build or kernel. would appreciate the commit kernel side if you come across it that "makes it so" or modification to build system that achieves the same. Thanks.
m
derp, nvm i can just script it, init.d or service
Code:
[email protected]:/ # ifconfig -a | grep HWaddr
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
dummy0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
[email protected]:/ # ifconfig wlan0 down
[email protected]:/ # ifconfig wlan0 hw ether 00:11:22:33:44:55
[email protected]:/ # ifconfig wlan0 up
[email protected]:/ # ifconfig wlan0 | grep HWaddr
wlan0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
Only posting because privacy is NOT an issue for my situation, so i need mac to stay the same.
@zacharias.maladroit the twrp build in my kernel thread.
I'm still in training for the army, and my gf needs the laptop this week. But I'll try to fix some bugs after next week
moonbutt74 said:
Z,
Code:
also there's some issue if you use the twrp recovery script to boot to TWRP via volume-button pressing during bootup - also didn't work - which was weird
okay this is the bootimage repacked with bootrec setup, straight from androplus ramdisk setup aosp_z5p_boot.img
here's just the bootrec directory and init shortcut, unpack, rename init in ramdisk to init.real then extract zip, paste this directory [bootrec] and the init shortcut in.
check properties on the init shortcut to make sure it's pointing to /init bootrec.zip
and the recoveryimage you want is the twrp build for z5p
that should be it it worked for me just fine.
m
Click to expand...
Click to collapse
Thanks M !
Perhaps I didn't do it correctly the last time I tried,
what Recovery did you use for this ? TWRP ?
moonbutt74 said:
K, Z,
Quick note, the mac address in "stock" MM does not randomize. Meaning mac filter entry in router remains valid/correct across reboot.
So this is build or kernel. would appreciate the commit kernel side if you come across it that "makes it so" or modification to build system that achieves the same. Thanks.
m
derp, nvm i can just script it, init.d or service
Code:
[email protected]:/ # ifconfig -a | grep HWaddr
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
dummy0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
[email protected]:/ # ifconfig wlan0 down
[email protected]:/ # ifconfig wlan0 hw ether 00:11:22:33:44:55
[email protected]:/ # ifconfig wlan0 up
[email protected]:/ # ifconfig wlan0 | grep HWaddr
wlan0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
Only posting because privacy is NOT an issue for my situation, so i need mac to stay the same.
Click to expand...
Click to collapse
yeah, that is an annoyance when you're working with a MAC filter,
https://github.com/sonyxperiadev/kernel/commit/6ad557733ff801d6ba70fdba3af9a64a9819c9a4 is one related
net: wireless: bcmdhd: Remove random mac code from PNO module
Generalizing the code that sets the random mac
as it will be used by PNO, gscan, RTT.
Click to expand...
Click to collapse
but I had a different commit (or configuration) in mind, will notice you once I stumbled upon it again
Meanwhile git blame path/to/file is your friend that way you could trace down the offending commits of the changes in the files
krabappel2548 said:
I'm still in training for the army, and my gf needs the laptop this week. But I'll try to fix some bugs after next week
Click to expand...
Click to collapse
Can you host those changes somewhere, once you do ? That way it would be easier to fix issues across the devices (Z5, Z5P and Z5C)
I've just read that the flash of the cam doesn't appear to work (and the colors are off - perhaps that improved from the last time I tested due to recent kernel changes)
---------- Post added at 02:31 PM ---------- Previous post was at 02:20 PM ----------
moonbutt74 said:
K, Z,
Quick note, the mac address in "stock" MM does not randomize. Meaning mac filter entry in router remains valid/correct across reboot.
So this is build or kernel. would appreciate the commit kernel side if you come across it that "makes it so" or modification to build system that achieves the same. Thanks.
m
derp, nvm i can just script it, init.d or service
Code:
[email protected]:/ # ifconfig -a | grep HWaddr
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
dummy0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
[email protected]:/ # ifconfig wlan0 down
[email protected]:/ # ifconfig wlan0 hw ether 00:11:22:33:44:55
[email protected]:/ # ifconfig wlan0 up
[email protected]:/ # ifconfig wlan0 | grep HWaddr
wlan0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
Only posting because privacy is NOT an issue for my situation, so i need mac to stay the same.
Click to expand...
Click to collapse
Found the commits:
commit d9c59afc703570ce1ed9f14945d288bf797fd8f3
Author: Chirayu Desai <[email protected]>
Date: Sat Dec 12 18:50:54 2015 +0530
net: wireless: bcmdhd/somc-wifi-ctrl: Fix random MAC usage ...
... when nothing is written to the macaddr file.
The current check for 'readlen > 0' only accounts for the cases
where something is written to the macaddr file.
If nothing is written at all, the random MAC won't be used either,
and the bcmdhd driver's random MAC setting fails as well, which results
in a MAC of all zeroes, which isn't usable.
While this isn't perfect for normal use cases (as it'll generate a new random
MAC each boot), it's better to have wifi functioning with this rather
than not working at all.
Also sneak in a little change to move the file closing near it's usage.
Change-Id: I27aed88160e735460ba6e76160e6f5660e0bbd39
commit a3263d45ed60227cd20c668df7215e9376d94099
Author: Ecco park <[email protected]>
Date: Wed Sep 3 14:06:05 2014 -0700
net: wireless: bcmdhd set random mac for SOFTAP
17373032 SoftAp has constant MAC that is not changed between reboots
Change-Id: I3cd0283175e47391e5def68cf1c6cc375b777163
Signed-off-by: Ecco park <[email protected]>
Signed-off-by: Dmitry Shmidt <[email protected]>
commit d82d3d0f0e79b46f18b0bbba9ae0d021e2b26f6c
Author: Ashwin <[email protected]>
Date: Fri Aug 1 18:33:51 2014 -0700
net: wireless: bcmdhd: PNO MAC address rotation
This change will need updated FW to work
Change-Id: Iaa94ee1969ddab1a3c3d61a3e1bbdebaea2022af
Signed-off-by: Ashwin <[email protected]>
Click to expand...
Click to collapse
the oldest one is probably that one that you seek,
didn't know that Apple with iOS8 also started to implement that "feature"
exfat card mount manual approach
K, Z, @CTXz
Okay got my exfat card to mount, but it's sort of funky here goes
first in your device tree make sure you have the following option set/defined
TARGET_KERNEL_HAVE_EXFAT := true
Patch in exfat support in kernel
OKay now,
Code:
cat /proc/partitions
major minor #blocks name
[ snip snip ]
[COLOR="Red"]179 64 124868608 mmcblk1[/COLOR]
Warning: slightly goofy example!
Code:
mkdir /storage/nubby
mount.exfat -d -o rw /dev/block/mmcblk1 /storage/nubby
which results from an adb shell in running output as:
Code:
FUSE exfat 1.2.3
FUSE library version: 2.9.3
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.23
flags=0x0001f7fb
max_readahead=0x00080000
INIT: 7.19
flags=0x00000031
max_readahead=0x00080000
max_write=0x00020000
max_background=0
congestion_threshold=0
unique: 1, success, outsize: 40
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 6363
getattr /
unique: 2, success, outsize: 120
unique: 3, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 6363
unique: 3, success, outsize: 32
unique: 4, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 6363
readdir[0] from 0
unique: 4, success, outsize: 464
unique: 5, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 6363
unique: 5, success, outsize: 16
unique: 6, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 6363
getattr /
unique: 6, success, outsize: 120
unique: 7, opcode: LOOKUP (1), nodeid: 1, insize: 56, pid: 6363
LOOKUP /.android_secure
getattr /.android_secure
NODEID: 2
unique: 7, success, outsize: 144
unique: 8, opcode: LOOKUP (1), nodeid: 1, insize: 48, pid: 6363
LOOKUP /Android
getattr /Android
NODEID: 3
unique: 8, success, outsize: 144
unique: 9, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 6363
LOOKUP /DCIM
getattr /DCIM
NODEID: 4
unique: 9, success, outsize: 144
unique: 10, opcode: LOOKUP (1), nodeid: 1, insize: 49, pid: 6363
LOOKUP /Download
getattr /Download
NODEID: 5
unique: 10, success, outsize: 144
unique: 11, opcode: LOOKUP (1), nodeid: 1, insize: 47, pid: 6363
LOOKUP /Movies
getattr /Movies
NODEID: 6
unique: 11, success, outsize: 144
unique: 12, opcode: LOOKUP (1), nodeid: 1, insize: 49, pid: 6363
and so on, each LOOKUP is a directory on my external sdcard [exfat format]
this is in my cm13 build
and so
Code:
mount -o bind /storage/nubby /sdcard/nubby/
ls /sdcard/nubby/
Android DCIM Download Movies Pictures TWRP Tunes apkbak customized-capability.xml video
So, nubby rules !!! :silly:
What doesn't happen is the registering of the media files on the now mounted and readable/writeable external sdcard [exfat]
my guess is groups and permissions, as even manual launching of a media file does not pick up via cm's media player or mxplayer, but copying files to and from work.
m
derp, okay so with the above it appears to be vold being the problem and not format support on the kernel-side
Mounted External sdcard [exfat]
K, Z, @CTXz
Okay, continuing from my previous post on mounting your exfat external sdcard,
This works in CM13 and should in AOSP, admittedly it's a little sloppy but hey.
Changes in boot.img as follows:
/sbin/<name of script>
Script contents:
Code:
#!/system/bin/sh
mount -o rw,remount /
mkdir /mnt/media_rw/sdcard1
mount.exfat -o uid=1023,gid=1023 /dev/block/mmcblk1 /mnt/media_rw/sdcard1
mkdir /storage/sdcard1
mount -o bind,uid=1023,gid=1023 /mnt/media_rw/sdcard1 /storage/sdcard1
mount -o ro,remount /
/init.environ.rc
add the following line below
Code:
export SECONDARY_STORAGE /storage/sdcard1
/init.rc
make sure media_rw is 755
Code:
mkdir /mnt/media_rw 0755 root media_rw
AT THE VERY BOTTOM OF init.rc <just to make sure everything else is already in place,
add the service which will fire the script
Code:
service <name of script> /sbin/<name of script>
class main
oneshot
repack the boot.img and flash, recognition should be instant though some apps will still not register
the existence of the card, haven't tested on a full factory reset yet.
Again from my previous post, you must have exfat support patched into kernel,
you must make sure to include in boardconfig.mk
Code:
TARGET_KERNEL_HAVE_EXFAT := true
so your rom-side support will compile, all the exfat stuff.
m
K, i will make the mod to your build and test it out in a bit. I did not utilize the fstab in this so your external card will not be picked up as a candidate for adoptable storage.
@krabappel2548
Okay, yeah you don't have the rom-side exfat support, you're kernel's good.
You're missing:
Code:
/system/bin/exfatck
/system/bin/exfatinfo
/system/bin/exfatlabel
/system/bin/exfatvsn
/system/bin/fsck.exfat
/system/bin/mkexfat
/system/bin/mkfs.exfat
/system/bin/mount.exfat
/system/lib64/libexfat.so
/system/lib64/libfuse.so
I've attached the above mentioned files for convenience.
The above files i pushed into your build from cm13. Although vold still seems to accuse the card of being corrupt.
After pushing the above mentioned files in conjuction with the modifications to boot.img mentioned previously i do get my card to mount @ an alternate point. /sdcard1 , and it does pick up as storage in totalcommander file manager. but still doesn't get past the vold smell test so no other apps looking for "proper" mount point see it.
Okay final round,
after factory resetting, with your original boot.img modified only with the bootrec setup for booting into recovery, and the aforementioned files for exfat support rom-side:
The card initially comes up as corrupt,
Format for Portable storage succeeds , card useable normally.
Format for internal storage corrupts, I am guessing it to be an issue with the size of the card [128gb]
as two additional partitions are created but neither readable, i don't have a 32gb card to test/verify..
Card format as portable storage seems to survive across reboots so :good: ?
So adoptable storage option for this size card seems to be broken.
m
before the aosp formatting the card, the entire card/block/device was mmcblk1 <-- working for cm13 with sloppy mount / not working with aosp
after aosp format the card/block/device was mmcblk1p1 <-- not working at all cm13 / working in aosp
Click to expand...
Click to collapse
on closer look - this is an issue of the naming scheme of devices:
if devices e.g. are attached, not properly unmounted and then another one attached
the previous device name is already taken - so a "simple" script will fail
You could either see whether it works
1) with regular expressions:
mounting it via mmcblk1p*
(don't ask how to do it - I haven't done it yet )
2) with persistent naming:
/dev/disk/by-id , by-label (does exFAT use these ?), by-uuid
https://wiki.archlinux.org/index.php/persistent_block_device_naming
http://unix.stackexchange.com/questions/86764/understanding-dev-disk-by-folders
http://unix.stackexchange.com/quest...a-way-to-change-a-device-id-in-dev-disk-by-id
http://unix.stackexchange.com/questions/86764/understanding-dev-disk-by-folders
I flashed via fastboot files and reboots the phone screen only Sony ... why this happens ?
Rubensss said:
I flashed via fastboot files and reboots the phone screen only Sony ... why this happens ?
Click to expand...
Click to collapse
Make sure you really flash all:
(recovery is not necessarily needed for the AOSP to boot up)
- fastboot flash boot boot.img
- fastboot flash recovery recovery.img
- fastboot flash userdata userdata.img
- fastboot flash system system.img
Click to expand...
Click to collapse
otherwise you'll get into a loop during boot,
otherwise:
do an emergency off,
flash again and see whether that helps (it did once or twice for me)
zacharias.maladroit said:
Make sure you really flash all:
(recovery is not necessarily needed for the AOSP to boot up)
otherwise you'll get into a loop during boot,
otherwise:
do an emergency off,
flash again and see whether that helps (it did once or twice for me)
Click to expand...
Click to collapse
I try to flash it again without recovery.img No I have to do before flashing wipes ?
Rubensss said:
I try to flash it again without recovery.img No I have to do before flashing wipes ?
Click to expand...
Click to collapse
formatting /cache, wiping dalvik cache
might help, yes
Not sure what else you have in mind
Backup your data since this will surely wipe internal storage (userdata.img)
zacharias.maladroit said:
formatting /cache, wiping dalvik cache
might help, yes
Not sure what else you have in mind
Backup your data since this will surely wipe internal storage (userdata.img)
Click to expand...
Click to collapse
I have tried again , this time making full and wipes without flashing recovery.img but when you start the phone gets directly to the TWRP recovery ... I've flashed 2 times and does the same. I think I 'll wait to see if they make a flashable file TWRP , thank you very much anyway zacharias.maladroit . By the way , I have installed in your kernel v.2.2 and will RomAur luxury . a greeting
I'm having bootloops as well. I cleared the system, cache and dalvik using TWRP. Model is 6833
May I know what is the difference between your build and fxp's aosp?
frostmore said:
May I know what is the difference between your build and fxp's aosp?
Click to expand...
Click to collapse
There are FXP Marshmallow builds ?
Link please
I searched and I see this:
http://fxpblog.co/aosp/aosp-6-0/
http://uploaded.net/f/53n94q
AOSP_M_160416_satsuki.zip seems to be the latest. What do you think? @zacharias.maladroit
I might be wrong but you can check guys!
Related
(c) by m0narx
Moscow,Russia
Small console extension for rooted ROMs:
What you get:
- bash
- samba - complete CIFS server, discover you Desire as windows share from the box
- sshd - SSH server
- mc - Midnight Commander
- htop - process manager
- tree - directory tree
- screen
- cpulimit
- zip
- colored bash prompt /sdcard/data/root/.bashrc
and more (iftop, opkg, pppd)
!!!UPDATE 09/06/10!!!
D/L smallupdate.zip below -before setup you should have latest console.zip already installed
!add - nano editor
!fix - usbnet minor fixes
!!!UPDATE 08/06/10!!!
!fix - bash grep incorrect option bug fixed
!add - SCP enabled, still no SFTP yet...
!add - root, var and tmp are moved to EXT partition to mount during boot time(works only with app2sd)
!add - you may put your personal init scripts to /system/sd/init.d
they will be launched just the same manner as from /system/etc/init.d
!add - to autostart samba and sshd - just run "samba auto" or "sshd auto"
to turn autorun off just run "samba auto" or "sshd auto" again
!add - usbnet command (it's not necessary to connect in internet sharing mode any more), run in console:
"usbnet on" - turn on with IP: 192.168.100.1
"usbnet off" - self describing
"usbnet auto" - turn on IP and run samba & sshd
How to:
1. D/l console.zip ( 10.19 MB ) below
!!!UPDATE!!! 08/06/10
http://files.mail.ru/X44YRN
http://rapidshare.com/files/396639709/console_new.zip.html
MD5: 27636042F84D55A813C14AD1063E88B7
2. Reboot your phone in FASTBOOT connected by USB to PC
3. launch update-eng.cmd or update-rus.cmd
4. Phone will reboot in recovery - wait 'till windows will recognize it and then press any button.
5. Wait for the update to come and after that it'll reboot in normal mode
6. You're good to go
Can some one develop an APP or widget to control those daemons with current status?!
after reboot to start SSH server:
1. launch terminal from your phone (ConnectBot или BetterTerminal)
or ADB shell from PC
2. type
su
bash
sshd start
Connect phone to PC in Shared Internet mode
or
get a IP address by WIFI from your LAN
launch Putty (included in archive)
in HOST type in your IP
click open
on "Login as:" prompt enter root, and "root's password" is also root
type bash and ENTER
now you have complete console with MC and even mouse working
you may also start smbd daemon by
samba start
after that you may access you Desire by entering it's shared folders:
\\192.168.100.254(your Desire's IP)
shares can be changed in /data/etc/samba/smb.conf
normal colored ADB FIX for WINDOWS:
1. copy *.* from winupdate folder to your C:\Windows\system32\
2. open CMD and launch
ansicon -i
3. now you have colored ADB
Sounds pretty interesting
This works brilliantly - thanks. Can you confirm whether I need to run the commands each time the phone reboots. It would be nice if we could get it to start samba automatically on reboot if not. Great work, thanks.
Can you confirm whether I need to run the commands each time the phone reboots.
Click to expand...
Click to collapse
Restart your phone and find out.
If it doesn't there's a free app on the marker called 'autostarts(root)' that does exactly what is says on the tin.
manks said:
This works brilliantly - thanks. Can you confirm whether I need to run the commands each time the phone reboots. It would be nice if we could get it to start samba automatically on reboot if not. Great work, thanks.
Click to expand...
Click to collapse
for now it isnt! i wonder if we could use this autostarts app mercianary mentioned! i'll try it later today.
also i wonder if additional system services will eat more juice?!
Also other suggestions are appreciated...
do your update.cmd in fastboot usb in my win7 notebook,it tell me device not found。could you provide a zip file that I could flash in the recovery?
Same Happened to me. If You put your phone in recovery first then run it it should work.
Awesome... thanks!!! Will try it out.
Hope you can update the scripts and apply everything automatically on each boot.. will be awesome
EDIT:
Tested and everything works... Samba is OK, I can copy files... but I only get speeds like 500kb/s over wireless... should be more!
Also I can't delete files... but permissions seems fine?
Conf:
[SDCARD]
comment = Internal micro secure digital card
path = /sdcard
browseable = yes
available = yes
public = yes
writable = yes
read only = no
create mask = 0777
directory mask = 0777
create mode = 0777
guest ok = yes
guest only = yes
2ND EDIT:
Tested ssh, works fine, but how can we enable SCP/SFTP?
d3sm0nd said:
Tested and everything works... Samba is OK, I can copy files... but I only get speeds like 500kb/s over wireless... should be more!
Click to expand...
Click to collapse
How are the load averages and IO stats while the transfer is in progress?
Just tested and it's really great but it's really really slow for me when I connect via ssh or use samba.
Anyone having the same issue?
emontes said:
Just tested and it's really great but it's really really slow for me when I connect via ssh or use samba.
Anyone having the same issue?
Click to expand...
Click to collapse
yes it is slow but it works!
I cant figure how to make samba and ssh start at boot.
I downloaded autostart from market and it told me to make an executable file named autostart.sh at /data/opt/
I created file autostart.txt and put some commands in there and renamed it to autostart.sh (changed extension, not just changed name) and chmod-ed it in ssh putty (bash mc) and so on.
but it still doesnt work...
maybe kernel needs to be tweaked??
Re: extended Desire console with bash,sshd,samba,mc and more...
Do you guys use apps2sd? I think it might be slow because of it...
------------------------------------
Sent via the XDA Tapatalk App
Actually, this doesn't work at all for me, maybe because I'm using Defrost that doesn't really work with any networking app I know (Swift, quicksshd for instance)
Can't access samba / can't even start ssh
Above SCP / SFTP, I still did not work (((In the nearest future to get to work NMBD.
If you want to run SSHD automatically on boot, you must create a file "98sshd" in the folder /system/etc/init.d with the following content:
Code:
#!/system/bin/sh
/data/xbin/sshd start
If you want to run SMBD automatically on boot, you must create a file "97samba" in the folder /system/etc/init.d with the following contents:
Code:
#!/system/bin/sh
/Data/xbin/samba start
P.S. download these files to the phone can only help RECOVERY console, using "adb push"
Don't forget chmod +x on /system/etc/init.d/97samba and /system/etc/init.d/98sshd
Sorry for my english
m0narx said:
Sorry for my english
Click to expand...
Click to collapse
Wow! the developer himself finally appeared!
We'll work together to fix stuff, he'll make changes - i'll translate 'em and collect suggestions - so bad english is not a prob. desire - that's what counts! ) (i sense play on words here! )
StrongOneX said:
yes it is slow but it works!
Click to expand...
Click to collapse
Didn't say it doesn't work did I?
M0narx,
Great one, mate. Really useful one.
Keep up the good work
m0narx said:
P.S. download these files to the phone can only help RECOVERY console, using "adb push"
Don't forget chmod +x on /system/etc/init.d/97samba and /system/etc/init.d/98sshd
Click to expand...
Click to collapse
Hey M0narx,
Tried to do an auto restart but it didn't work.
Went in recovery, pushed the files to init.d, chmod`ed 777 but no joy.
Even trying with autostart from Market Place but don't know why, it doesn't autostart for me
Any hint?
Cheers.
i'm not sure whether it works or not...
chmoded to 777, samba sshd mods are 777 also.
may be it's forbidden to run from /data/xbin on boot?
i think samba does not start at boot cause there are no IP addresses during boot time.
but still sshd is running due to ps:
Code:
ps w | grep ssh
128 root 528 S /system/xbin/dropbear -A root -N root -C root -U 0 -G 0 -a -P /sdcard/data/var/run/sshd.pid -b /data/etc/
i'm not sure what does dropbear process mean either.
and also there are .pid files in /sdcard/data/var/run/ for sshd and samba with nonexistent PIDs
Code:
# sshd start
sshd start
Starting SSH server... /system/xbin/dropbear is already running
also netstat:
Code:
# netstat -na
netstat -na
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:16650 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN
tcp 0 0 :::7890 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
and ifconfig
Code:
# ifconfig
ifconfig
eth0 Link encap:Ethernet HWaddr 00:23:76:D8:94:52
inet6 addr: fe80::223:76ff:fed8:9452/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:87 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5046 (4.9 KiB) TX bytes:492 (492.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1832 (1.7 KiB) TX bytes:1832 (1.7 KiB)
EDIT:
i found out that grep in not working in bash any more complaining about unrecognized option (it's for colored grep output)
Code:
[04:23:28 /data/local]# ps w | grep sshd
/system/xbin/grep: unrecognized option `--color=auto'
BusyBox v1.16.0 (2010-01-29 22:31:34 CET) multi-call binary.
Usage: grep [-HhrilLnqvsoeFEABC] PATTERN [FILE]...
Search for PATTERN in each FILE or standard input
Options:
-H Prefix output lines with filename where match was found
-h Suppress the prefixing filename on output
-r Recurse
-i Ignore case distinctions
-l List names of files that match
-L List names of files that don't match
-n Print line number with output lines
-q Quiet. Return 0 if PATTERN is found, 1 otherwise
-v Select non-matching lines
-s Suppress file open/read error messages
-c Only print count of matching lines
-o Show only the part of a line that matches PATTERN
-m N Match up to N times per file
-F PATTERN is a set of newline-separated strings
-E PATTERN is an extended regular expression
-e PTRN Pattern to match
-f FILE Read pattern from file
-A N Print N lines of trailing context
-B N Print N lines of leading context
-C N Print N lines of output context
Can I use pubkey auth with this sshd?
Hello,
i tried several ics roms on my phone. on most of them, i get a "Data roaming" notification error every few minutes, regardless of the the fact that i unchecked "data roaming" and all data related switches in the settings.
is there a way to disable the message ?
Thank You
P.S. I am on cm 9.1 team acid rom at the moment.
What is the compelling value of removing the notification? (I'm a product manager by day.) The reality is that your phone probably is data roaming, though perhaps on a network that you are not billed for.
Just trying to prioritize, since this would require a user switch to enable/disable.
Looks like someone else found a hack to remove it from a ROM if you wanted it yourself.
Posted from my SGS4G, thanks to Team Acid development
---------- Post added at 09:06 AM ---------- Previous post was at 08:36 AM ----------
The "hack" mentioned above could be performed using "the usual" zip and apktools by any user. Note that the hack simply removes the notification, it does not change the fact that it was reported that the phone has entered a data-roaming state.
Additionally, since CM9 can be compiled from source by anyone with a "reasonable" computer, especially as Ubuntu can be run side-by-side with Windows, or under VirtualBox, the source can be patched and a custom version compiled.
The impacted source appears to be packages/apps/Phone/src/com/android/phone/NotificationMgr.java
Code:
1262 /**
1263 * Shows the "data disconnected due to roaming" notification, which
1264 * appears when you lose data connectivity because you're roaming and
1265 * you have the "data roaming" feature turned off.
1266 */
1267 /* package */ void showDataDisconnectedRoaming() {
1268 if (DBG) log("showDataDisconnectedRoaming()...");
1269
1270 Intent intent = new Intent(mContext,
1271 com.android.phone.Settings.class); // "Mobile network settings" screen / dialog
1272
1273 Notification notification = new Notification(
1274 android.R.drawable.stat_sys_warning, // icon
1275 null, // tickerText
1276 System.currentTimeMillis());
1277 notification.setLatestEventInfo(
1278 mContext, // Context
1279 mContext.getString(R.string.roaming), // expandedTitle
1280 mContext.getString(R.string.roaming_reenable_message), // expandedText
1281 PendingIntent.getActivity(mContext, 0, intent, 0)); // contentIntent
1282
1283 mNotificationManager.notify(
1284 DATA_DISCONNECTED_ROAMING_NOTIFICATION,
1285 notification);
1286 }
Replacing that with something like the following would permanently disable the notification. It could not be re-enabled (without flashing something else) if you were traveling to a location where notification of data connectivity was important to you.
Code:
/**
* Shows the "data disconnected due to roaming" notification, which
* appears when you lose data connectivity because you're roaming and
* you have the "data roaming" feature turned off.
*/
/* package */ void showDataDisconnectedRoaming() {
if (DBG) log("showDataDisconnectedRoaming() -- disabled in this version");
}
Edit -- I've attached a build of Phone.apk that may disable the notification (and still work as a phone).
Please, please backup your current Phone.apk and all before installing and confirm that the phone works as expected, especially before entering any situation when the phone might be deemed critical for any emergency, business, personal, or other need. In at least one case, the user was not able to make phone calls after installing this on a non-CM9 ROM.
The Phone.apk was built using the current CM9 build tree, as configured by the TeamAcid local_manifest.xml
This patch is provided without warranty and under the terms of the original 'Apache 2.0" license, found in the NOTICE file in both the object and source attached. Source has been provided here as a courtesy to other developers as well as to meed the retention requirements of section 4(c) of the license.
Don't we just love source code!
Thank you SO MUCH jeff for all your efforts and help. I will back up \system\app\phone.apk before flashing your apk file.
I've extracted the phone.apk from the file you sent, but it gives an error after I press install and see the program bar for few seconds "Application not installed".
This is the rom i'm reffering to :
http://forum.xda-developers.com/showthread.php?t=1730954
I'll look into this, hopefully today. It looks like that link is to Team Acid CM9, which should work (especially as the APK was built in a CM9 environment).
Thank you Jeff. If you know this rom, Can you recommend the best battery saving kernel for this rom ?
fish72 said:
Thank you Jeff. If you know this rom, Can you recommend the best battery saving kernel for this rom ?
Click to expand...
Click to collapse
I know it better than I probably should. I recommend the Hefe kernel.
Team Acid has graciously incorporated the Hefe kernel code into the current CM9 and AOKP builds. Some of the ROM poters/assemblers also use it or the pre-compiled version.
I run with Smartassv2 scheduler, and my specific phone seems stable with 100-1200 MHz as well as an additional 100 mV of undervolting. Your phone may vary. I use System Tuner (Pro) to set these on my phone; there are other apps as well, but I'm very happy with the level of dev support on that specific one.
I get ~1% per hour with my phone on the nightstand; WiFi off, 3G on, email and Twitter syncing, and whatever else is doing its thing, after watching Better Battery Stats for a few nights and removing/freezing some app "offenders" that I don't need on my phone. In contrast to many of the detractors of ICS, I find i have significantly better battery life on ICS than I ever did with GB.
Thank you very much jeff for your detailed and useful info.
Looking forward for the compiled phone.apk, and then will deal with kernel and fine-tuning
OK, I was able to see the error and that the OS wasn't letting the Phone.apk be installed through the run-time UI.
Reboot to recovery, connect via adb
$ adb shell
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
[b][i]/dev/block/mtdblock2 on /system type yaffs2 (rw,relatime)[/i][/b]
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/block/mtdblock5 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
Good -- the /system partition is mounted "rw" -- read/write. If not, you can mount using recovery or with ~ # mount /system
Set up the PATH so I don't have to prefix everything with busybox
Code:
~ # echo $PATH
echo $PATH
/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
~ # export PATH='/system/xbin:/sbin:/vendor/bin:/system/sbin:/system/bin'
export PATH='/system/xbin:/sbin:/vendor/bin:/system/sbin:/system/bin'
Make a backup of the original
Code:
~ # ls -l /system/app/Phone*
ls -l /system/app/Phone*
-rw-r--r-- 1 root root 1194243 Aug 1 2008 /system/app/Phone.apk
-rw-r--r-- 1 root root 3996106 Aug 1 2008 /system/app/Phonesky.apk
~ # cp /system/app/Phone.apk /sdcard/Phone.apk.orig
cp /system/app/Phone.apk /sdcard/Phone.apk.orig
Copy in the new and set its permission bits properly -- mine "new" version was put in /sdcard/INSTALL/apks/
Code:
~ # cp /sdcard/INSTALL/apks/Phone.apk /system/app
cp /sdcard/INSTALL/apks/Phone.apk /system/app
~ # ls -l /system/app/Phone.apk
ls -l /system/app/Phone.apk
-rwxrwxrwx 1 root root 2643912 Sep 19 20:32 /system/app/Phone.apk
~ # chmod 644 /system/app/Phone.apk
chmod 644 /system/app/Phone.apk
~ # ls -l /system/app/Phone*
ls -l /system/app/Phone*
-rw-r--r-- 1 root root 2643912 Sep 19 20:32 /system/app/Phone.apk
-rw-r--r-- 1 root root 3996106 Aug 1 2008 /system/app/Phonesky.apk
Reboot and it should be there. You'll probably get the "Android is upgrading" message for one app -- the new Phone.apk
Well....I didn't manged to access the phone using adb. What I did is :
1. Downloaded total commander
2. made /system folder RW
3. overwrited original phone.apk with your phone.apk
4. rebotted the phone
Now I will see how it goes.
Thank you
Hi Jeff
In MIUI source I don't see any "NotificationMgr" (java or class).
How can I disable the data roaming message then ?
Thanks.
EDIT : I meant MIUI phone.apk (not the entire MIUI source).
I attach here a decompiled MIUI Phone.apk...
As a bit of warning to anyone following in my footsteps here -- Miui "source" is over 25 GB from https://github.com/MiCode/patchrom and repo sync
Hi Fish, why don't you just turn off data roaming ?
It does not disable your 3G/4G and in our country you're always on the same network.
I have never seen a Pelephone device going to Orange or vise versa.
It's a warning you apparently get when you lose data connectivity due to data roaming being restricted. I used to see it when my office was at a different location with T-Mobile as my carrier.
Posted from my SGS4G, thanks to Team Acid development
---------- Post added at 09:54 AM ---------- Previous post was at 09:17 AM ----------
itzik2sh said:
In MIUI source I don't see any "NotificationMgr" (java or class).
How can I disable the data roaming message then ?
Click to expand...
Click to collapse
After getting the Miui "source," it appears that it is more of an automated ROM modifier, rather than a from-source ROM builder. There isn't Java source for a lot of things in there, so it looks like the changes would need to be made in a way similar to the hack I linked in Post #2, above.
My htc was off for one month because i went to a trip and did not take it with me. when i came back i turned it on and boom! bootloop! came from nowhere.
I had the vipers rom on it so i tried to update to the newest vipers rom but still bootloop. i tried to install different rom but nothing help,
At the end i installed RUU and still i'm in bootloop! please help me
amitshkuri said:
My htc was off for one month because i went to a trip and did not take it with me. when i came back i turned it on and boom! bootloop! came from nowhere.
I had the vipers rom on it so i tried to update to the newest vipers rom but still bootloop. i tried to install different rom but nothing help,
At the end i installed RUU and still i'm in bootloop! please help me
Click to expand...
Click to collapse
can you boot into bootloader?
if yes post all the on screen details
rzr86 said:
can you boot into bootloader?
if yes post all the on screen details
Click to expand...
Click to collapse
yes i can get into bootloader but in recovery i get error.
***LOCKED***
PYRAMID PVT SHIP S-OFF RL
HBOOT-1.27.0000
RADIO-11.24A.3504.31_M
OpenADSP-v05.6.0.2226.00.0418
eMMC-boot
JAN 13 2012, 17:33:34
HBOOT
FASTBOOT
RECOVERY
FACTORY RESET
SIMLOCK
IMAGE CRC
amitshkuri said:
yes i can get into bootloader but in recovery i get error.
***LOCKED***
PYRAMID PVT SHIP S-OFF RL
HBOOT-1.27.0000
RADIO-11.24A.3504.31_M
OpenADSP-v05.6.0.2226.00.0418
eMMC-boot
JAN 13 2012, 17:33:34
HBOOT
FASTBOOT
RECOVERY
FACTORY RESET
SIMLOCK
IMAGE CRC
Click to expand...
Click to collapse
from this guide it has 3 options to flash 4ext recovery(see step 1)
http://forum.xda-developers.com/showthread.php?t=1472298
after that go into recovery
format all partitions except sdcard
flash the rom
see if it boots
rzr86 said:
from this guide it has 3 options to flash 4ext recovery(see step 1)
http://forum.xda-developers.com/showthread.php?t=1472298
after that go into recovery
format all partitions except sdcard
flash the rom
see if it boots
Click to expand...
Click to collapse
i flashed 4ext recovery and flashed 3.33 firmware and flashed ARHD 7.2 (i did full wipe for all patitions)
still in bootloop but now it pass the HTC logo and the quitly brilliant logo and start the beats animation then it restart.
HI
GREETINGS
according to your bootloader you have stock htc hboot and
stock htc hboot does not go well with soff
flash the hboot in my attachment
to flash the hboot:-
1 put the file in root of sd card
2 reboot into bootloader
3 the bootloader will scan the file, follow on screen instruction
4 reboot back in to bootloader and make a clean installation of the rom as suggested by "RZR86"
shrex said:
HI
GREETINGS
according to your bootloader you have stock htc hboot and
stock htc hboot does not go well with soff
flash the hboot in my attachment
to flash the hboot:-
1 put the file in root of sd card
2 reboot into bootloader
3 the bootloader will scan the file, follow on screen instruction
4 reboot back in to bootloader and make a clean installation of the rom as suggested by "RZR86"
Click to expand...
Click to collapse
I flashed the new hboot and flashed the recovery again and made a clean installation including format for all partitions and still i stuck in this bootloop! what can i do more?
amitshkuri said:
what can i do more?
Click to expand...
Click to collapse
Absolutely loads of stuff. First thing is to get the logs.
Flash a rom with adb set in the default.prop in the boot image ramdisk ( CM for example )
while the device is bootlooping run
Code:
adb shell dmesg
which gives the kernel messages then you can run
Code:
adb logcat -b system -b radio -b events -b main
this will run forever, you'll notice it repeating the same messages over and over, look out for lines that start with "E/"
they're errors being reported and will lead you to the cause of you're bootloop
If either of these two fail then reboot into recovery and run
Code:
adb shell cat /dev/last_kmsg
This is a saved copy of dmsg from the last session.
Once you've got the logs you can easily pinpoint the cause of the problem all you got is read them
PROTIP: Look for the word error or fail or something similar
ok so that's all the errors i found while booting:
E/QC-NETMGR-LIB( 165): couldn't open file /sys/module/f_rmnet/parameters/rmnet_ctl_ch
E/QC-NETMGR-LIB( 165): couldn't open /sys/module/rmnet/parameters/rmnet_ctl_ch
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/DxDrmNexPlayerIntegrator( 169): ** Discretix Server loaded config file - result=0 **
E/DxDrmNexPlayerIntegrator( 169): ** Discretix SignalsListener Thread is starting **
E/DxSecureClock( 169): ** Discretix Clock Monitor is starting **
E/msm8660.gralloc( 153): DEBUG_CALC_FPS: 0
E/msm8660.gralloc( 153): period: 10
E/msm8660.gralloc( 153): ignorethresh_us: 500000
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 0
E/SurfaceFlinger( 153): composer device failed to initialize (Invalid argument)
E/rmt_storage( 120): Unable to open /boot/modem_fsg
E/rmt_storage( 120): Invalid rmt_storage client
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 1
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 2
E/HtcBootAnimation( 225): Could not find width.
E/HtcBootAnimation( 225): Could not find height.
E/HtcBootAnimation( 225): Could not find framerate.
E/HtcBootAnimation( 225): Could not find part1.
E/HtcBootAnimation( 225): Could not find part2.
E/HtcBootAnimation( 225): Could not find part3.
E/HtcBootAnimation( 225): sqlite3_open error, sqlite result: 14, errno: 2, No such file or directory
E/QC-DIAG_LSM( 156):
E/QC-DIAG_LSM( 156): Diag_LSM: Diag_LSM_Init: Failed to open handle to diag driver, error = 13
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 3
E/ExtendedExtractor( 156): Failed to open MM_PARSER_LIB, dlerror = Cannot load library: reloc_library[1290]: 156
E/AudioPolicyManagerBase( 156): Could not open support_receiver()
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 4
And this came at the second of crash:
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 5
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 6
E/QC-NETMGR-LIB( 165): ifioctl: close port failed: (9)Bad file number
E/QC-NETMGR-LIB( 165): ifioctl: open port failed: (19)No such device
E/QC-NETMGR-LIB( 165): netmgr_kif_ifioctl_open_port() failed for rmnet0 on attempt 7
am i in trouble?
amitshkuri said:
am i in trouble?
Click to expand...
Click to collapse
It's difficult to say with ONLY the errors LOL. You've just removed all the context of what was going on around leading upto it. Can you post the rest of them, not here though, pastebin or somewhere like that.
Also dmesg output would be pretty useful to see if all the drivers are install correctly.
At first glance, You seem to be missing some vital libraries. files, to say anything more at this point would just be guessing? but yeah, dmesg and a full logcat.
Actually to save a back and forth you can run the following commands
Code:
adb root
adb shell stop
adb shell dumpstate > state.txt
adb shell dumpsys > sys.txt
Don't know what you know so I'll explain what this does.
adb root , restarts adb as the root user
adb shell stop, this stops the servicemanager and it's child services , basically stop loading android. If you have a boot animation you should see it stop, this also stops device from rebooting as the next commands take some time to run.
dumpstate and dumpsys will dump your entire device contents to state.txt and sys.txt on your desktop machine. you won't see any output and they do take some time to run so please be patient. As you've fully formatted it I wouldn't expect any personal data to be present in those files but may contain device specific info please have a look before posting. searching the for things like your email address, name, IMEI, serial no's etc should help.
Then zip the files and attach them to this thread. Like I mentioned these files contain everything about the Device and the current state and will give us everything we need to figure out whats wrong.
If you're not comfortable "doing the dump!" ( sounds like a song ) then option 1 of logcat and dmesg should do I'll probably end up asking for more but meh!
ok i tried but
Code:
adb root
adb shell stop
didn't help and the boot restart again and again so i cannot write the rest of codes you gave me.
i attached a rar file with the context of logcat and dmesg.
amitshkuri said:
ok i tried but
Code:
adb root
adb shell stop
didn't help and the boot restart again and again so i cannot write the rest of codes you gave me.
i attached a rar file with the context of logcat and dmesg.
Click to expand...
Click to collapse
That's fine dmesg tells all in this case, It's a bit weird. you system partition seem to be at fault. these messages
Code:
<6>[ 2.457794] EXT4-fs (mmcblk0p22): INFO: recovery required on readonly filesystem
<6>[ 2.457977] EXT4-fs (mmcblk0p22): write access will be enabled during recovery
<6>[ 2.466827] EXT4-fs (mmcblk0p22): barriers disabled
<6>[ 2.468963] EXT4-fs (mmcblk0p22): recovery complete
<6>[ 2.476013] EXT4-fs (mmcblk0p22): mounted filesystem with writeback data mode. Opts: barrier=0
which is just information but a couple of lines down is this
Code:
<6>[ 3.588012] EXT4-fs (mmcblk0p22): re-mounted. Opts: noauto_da_alloc,barrier=0
Logcat also has this related message
Code:
I//system/xbin/busybox( 107): tune2fs 1.41.12 (17-May-2010)
I//system/xbin/busybox( 107): tune2fs 1.41.12 (17-May-2010)
I//system/xbin/busybox( 107): The needs_recovery flag is set. Please run e2fsck before clearing
what it looks like is happening is the kernel has remounted your /system partition to try to set it up for recovery while the device is booting make system files unavailable in the process, which ties up to the messages about missing libraries from earlier on. it may well be easily solved simply by following the instruction and running e2fsck on /dev/block/mmcblk0p22, it worth a shot I'd say.
reboot into recovery and run
Code:
adb shell e2fsck /dev/block/mmcblk0p22
you may also have to remove the need_recovery flag from the partition... I don't know how to do that off the top of my head and I have to go out for a bit.... Google may be your friend
More Soon!
own diBeco
trevd said:
That's fine dmesg tells all in this case, It's a bit weird. you system partition seem to be at fault. these messages
Code:
<6>[ 2.457794] EXT4-fs (mmcblk0p22): INFO: recovery required on readonly filesystem
<6>[ 2.457977] EXT4-fs (mmcblk0p22): write access will be enabled during recovery
<6>[ 2.466827] EXT4-fs (mmcblk0p22): barriers disabled
<6>[ 2.468963] EXT4-fs (mmcblk0p22): recovery complete
<6>[ 2.476013] EXT4-fs (mmcblk0p22): mounted filesystem with writeback data mode. Opts: barrier=0
which is just information but a couple of lines down is this
Code:
<6>[ 3.588012] EXT4-fs (mmcblk0p22): re-mounted. Opts: noauto_da_alloc,barrier=0
Logcat also has this related message
Code:
I//system/xbin/busybox( 107): tune2fs 1.41.12 (17-May-2010)
I//system/xbin/busybox( 107): tune2fs 1.41.12 (17-May-2010)
I//system/xbin/busybox( 107): The needs_recovery flag is set. Please run e2fsck before clearing
what it looks like is happening is the kernel has remounted your /system partition to try to set it up for recovery while the device is booting make system files unavailable in the process, which ties up to the messages about missing libraries from earlier on. it may well be easily solved simply by following the instruction and running e2fsck on /dev/block/mmcblk0p22, it worth a shot I'd say.
reboot into recovery and run
Code:
adb shell e2fsck /dev/block/mmcblk0p22
you may also have to remove the need_recovery flag from the partition... I don't know how to do that off the top of my head and I have to go out for a bit.... Google may be your friend
More Soon!
Click to expand...
Click to collapse
The shell e2fsck did not help, still in bootloop.
i searched in google about the need_recovery flag and i found one post that explain how to do this but in ubuntu linux
the command " debugfs " mentioned there, i dont really understand what to do.
amitshkuri said:
The shell e2fsck did not help, still in bootloop.
i searched in google about the need_recovery flag and i found one post that explain how to do this but in ubuntu linux
the command " debugfs " mentioned there, i dont really understand what to do.
Click to expand...
Click to collapse
hi again.
After reading some more e2fsck need some extra options. apologises for that
Also as is usually the case with these things you're not the first person to have this problem. A quick xda search for "The needs_recovery flag is set" brings up this post
I've just tested it because my cache partition has the needs_recovery flag set so I ran the commands in that post in recovery and it did clear the needs_recovery flag. so in your case you need to boot into recovery make sure /system is NOT mount which should be the default state and run the following commands
Code:
adb shell
tune2fs -l /dev/block/mmcblk0p22 | grep features
this command get the list of filesystem features it should look something like this ( order may be different )
Code:
Filesystem features: has_journal resize_inode filetype needs_recovery extent sparse_super large_file
Next we'll run e2fsck with the right command this time LOL
Code:
e2fsck -f /dev/block/mmcblk0p22
After that we can remove the old journal with tune2fs
Code:
tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p22
This should remove both the has_journal and needs_recovery flags from the feature list. Seeing as has_journal was set we'll turn it back on
Code:
tune2fs -O has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p22
Note the caret symbol ( ^ ) which is the difference between the above to commands. This controls whether a feature should be added or removed
Finally check the feature list again
Code:
tune2fs -l /dev/block/mmcblk0p22 | grep features
It should now look like this or something similar, If it still has needs_recovery in the list then something is wrong
Code:
Filesystem features: has_journal resize_inode filetype extent sparse_super large_file
All we need to do now is pray to the ghost of steve jobs and say the magic words
Code:
reboot
And hopefully we might have a win for you! :good:
when i write this line: e2fsck -f /dev/block/mmcblk0p22
i get this: Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found. Fix<y>?
if i press "y" i get this: Inode 13765 is in use, but has dtime set. Fix<y>?
and more and more and more questions and cant continue with the next lines you gave me.
what to do?
amitshkuri said:
when i write this line: e2fsck -f /dev/block/mmcblk0p22
i get this: Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found. Fix<y>?
if i press "y" i get this: Inode 13765 is in use, but has dtime set. Fix<y>?
and more and more and more questions and cant continue with the next lines you gave me.
what to do?
Click to expand...
Click to collapse
e2fsck -f -y /dev/block/mmcblk0p22
That will answer yes to all questions!
i did all exactly and still in a bootloop..
i got Filesystem features: has_journal resize_inode filetype extent sparse_super large_file
without the needs recovery, all went well.
is there hope?
amitshkuri said:
i did all exactly and still in a bootloop..
i got Filesystem features: has_journal resize_inode filetype extent sparse_super large_file
without the needs recovery, all went well.
is there hope?
Click to expand...
Click to collapse
Time to rinse and repeat, Grab the dmesg and the logcat and lets see what it's saying now? Also Have you tried reflashing the rom, it's possible the tune2fs has deleted some files but we can only find out by looking at the logs!
i tried now to reflashed and still bootloop :/
i attached the new demsg and logcat.
thank you for all the help!
amitshkuri said:
i tried now to reflashed and still bootloop :/
i attached the new demsg and logcat.
thank you for all the help!
Click to expand...
Click to collapse
Not a problem on the help. At least you bought an interesting problem to solve It's not your normal bootloop cause.
hmmm , It seems to have gone back to needs recovery.... Ok. Can you run the command from earlier but this time do not re-add the journal feature, so these commands
Code:
tune2fs -l /dev/block/mmcblk0p22 | grep features
e2fsck -f -y -v /dev/block/mmcblk0p22
tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p22
tune2fs -l /dev/block/mmcblk0p22 | grep features
#EDIT Mount as read only to mark it ready for mounting
mount -ro -text4 /dev/block/mmcblk0p22 /system
reboot
can you copy the output of these commands and post them up, I'm just curious to see what its runnning.
Do you know how to make your boot image insecure and how to mount /system with rw by default?
If not can you send me the boot image you're using an i'll fix it up.
The plan is to attempt the fs repair and remove journaling which from what I understand can be responsible for triggering the needs_recovery. should that not work, the kernel will try running recovery on the fs at boot time but this time it won't need to remount the /system partition because it will be already mounted as rw ... that's the theory at least.
If it fails send the logs and we'll have a look a some other options depending on the log out. But I wouldn't be worried there's still a couple of more things we can leverage to fixup the system partition.
Hello fellow phone enthusiasts,
there are some sources on the internet describing how to run Debian on the Samsung Galaxy i7500 (Samsung's first Android device). Unfortunately, none of these sources can act as a complete guide, so I thought I could try to fill this void. This guide is far from complete and will hopefully grow over time. Anyway, I hope this is helpful for some people that are trying to do the same.
Note that this post should have gone into the development section, but I'm not senior enough to post there. Also the URLs in this guide are messed up for the same reason. Each messed up URL is marked with "(FIX this url)". I will fix these things as soon as possible, if there is any interest in this guide.
Best regards,
Frank
0. WARNING
This guide is for experienced users only. You might brick your phone while following this guide. I will not take responsibilty for any harm that may happen to you, your phone or those around you when following this guide. Please read and understand the complete guide before doing the first step. You have been warned.
Make a nandroid backup (can be done in the recovery image). Really, do it. Even if you think there's no valuable data, you must do a nandroid backub, because you will need to have the boot.img to boot back into android after debian has been installed. You must also copy your nandroid backup onto your PC.
1. Credits
A few years ago, there has been quite an active development community for the Galaxy i7500. Unfortunately, these forums have now pretty much died and I was not an active member of that community, because I was using it as my primary device back then and had no interest in hacking it.
Anyway, a HUGE THANK YOU goes to the fine fellas from drakaz.com and the GAOSP. You guys are awesome!
The actual hard technical work for this guide has been done by the authors of the following guides. I'm simply trying to understand what they did and write a step-by-step guide using their expertise:
(FIX this url)https :// code . google . com/p/linux-on-android/wiki/BasicSteps
(FIX this url)https :// wiki . debian . org/ChrootOnAndroid
(FIX this url)http :// www . bananenfisch . net/?p=1056
(FIX this url)https :// sven . killig . de/android/console.html
2. Overview
The goal of this guide is to have a running Debian Squeeze (Debian 6) running natively on a Samsung Galaxy i7500. Debian will not be run in a chroot environment on top of android, but instead the phone will directly boot into debian when powering it on. Debian will be installed on a SD card, so that we could still boot into Android, should we really mess things up at some point. It will not be true dual boot though (i.e. you have to reflash the boot section from a PC to boot into Android).
2.1 Primary goals
In the end, I'd like have the following functionality:
WLAN
Bluetooth
X Window / Graphical User Interface
All this is possible with below description now.
But this means we will loose the ability to make phone calls, send text messages, use GPS, connect to the internet through 3G or anything else you would normally expect from a smartphone. It's very likely possible to also have this functionality included, but I simply don't need it for my project. If someone else is willing to investigate this, I would be interested in the results though.
2.2 Prerequisites
Things you'll need include:
good Linux knowlegde
1 rooted Samsung Galaxy i7500 (I recommend to flash GAOSP)
1 micro SD card (I'm using an 8 GiB class 4 card)
1 computer running Linux with the following software installed (I'm using Debian & Fedora, but any distribution that has debootstrap should work)
debootstrap
git
fastboot (I suggest to use the version that comes with your distro, but you can also try the one from the Android SDK)
GCC cross-compiler for ARM in order to compile the kernel (Debian and Fedora come with compiler versions, that didn't work for me, so I'm using version 7 of the Android NDK, i. e. GCC version 4.4.3)
3. Installing Debian
Note that I had already GAOSP2 beta 3 installed on the i7500. I don't know if any of these steps are possible without installing GAOSP first.
3.1 Prepare partitions on SD card
The Samsung Galaxy i7500 has an "internal SD card" which will be preserved for use with Android, the recovery image, a.s.o. The external SD card will be used for debian. ALL data on the external card will be lost after below steps.
Put the SD card into an SD card reader or boot the i7500 into recovery mode (press "vol-" and "call" buttons when switching on the phone). Note that using GAOSP directly didn't work for me, because for some reason only the first partition was shown on the PC.
Code:
cfdisk /dev/sdX
(replace X with the correct letter for your SD card, and then create the one big enough partition for your needs, I created one 4GiB primary partition leaving me 4GiB for playing around later)
Code:
sudo mke2fs /dev/sdX1
3.2 Build debian filesystem structure
Create a directory for the newly created debian partition (I assume it' s called "debian") and run the following commands
Code:
sudo mount /dev/sdX1 ./debian/
Code:
sudo debootstrap --verbose --arch armel --foreign squeeze ./debian/ (FIX this url) http :// ftp . de . debian . org/debian
Code:
sudo umount ./debian/
3.3 Finalize the debian installation
The following is based on the steps as described here (FIX this url) wiki. debian.org/ChrootOnAndroid and www . bananenfisch .net/?p=1056.
Boot phone into GAOSP
Open terminal
Code:
su
Code:
cd /data/local
Code:
mkdir debian
Code:
mount /dev/block/mmcblk1p1 /data/local/debian
Finalize bootstrap:
Code:
chroot /data/local/debian /debootstrap/debootstrap --second-stage
Mount special file systems and chroot into Debian:
Code:
for f in dev dev/pts proc sys ; do mount -o bind /$f /data/local/debian /$f ; done
Code:
chroot /data/local/debian /bin/bash
Finalise the installation:
Code:
echo "deb (FIX this url) http :// ftp . de . debian . org/debian/ squeeze main non-free contrib" > /etc/apt/sources.list
Code:
apt-get update
Code:
rm -f /etc/mtab
Code:
ln -s /proc/mounts /etc/mtab
Code:
passwd root
Code:
echo i7500 > /etc/hostname
Code:
apt-get install openssh-server
Code:
apt-get clean && apt-get autoclean
The ssh-sever can be started whenever you like through
Code:
/etc/init.d/ssh start
Afterwards you can log in from your PC using "ssh [email protected]" into the chroot environment.
3.4 Configure locale
We need to set the locale for the system (otherwise there will always be warning messages, e.g. when installing new software):
Code:
apt-get install locales console-data keyboard-configuration
You might want to tweak a few more settings (especially if your locale is not en_US). You can use:
Code:
echo export LANG=en_US.UTF-8 >> /root/.bashrc
Code:
export LC_ALL="en_US.utf8"
Code:
dpkg-reconfigure locales
Code:
dpkg-reconfigure console-data
Code:
dpkg-reconfigure keyboard-configuration
3.5 Installing additional software
You can now start installing additional software that you might need (I suggest you log into your phone through ssh as described above). You'll be needing an editor to edit configuration files (I choose vim). For setting up WiFi the package "wpasupplicant" is needed.
Code:
apt-get install vim less wpasupplicant
3.6 Chroot into debian
If you at a later time want to chroot into your debian environment, I recommend to store the following commands in a shell script (I stored it in /data/local/debian.sh) which you can then run as root.
Code:
#!/bin/sh
mount /dev/block/mmcblk1p1 /data/local/debian
for f in dev dev/pts proc sys ; do mount -o bind /$f /data/local/debian/$f ; done
chroot /data/local/debian /bin/bash
4. Create boot image
4.1 Build kernel
Perform the following steps on your PC:
Download the Galaxo kernel sources: git clone (FIX this url) https :// github . com/drakaz/GalaxoKernel.git
Apply the patch described on (FIX this url) https :// code . google . com/p/linux-on-android/wiki/BasicSteps (themddi_toshiba_smd.c patch doesn't work, do the change manually)
Apply patch as described here: (FIX this url) http :// sven . killig . de/android/console.html
copy attached config.txt file to .config
I will eventually create a branch on github containing the patches and default config. But for now, you'll have to do the patching yourself.
Code:
make ARCH=arm CROSS_COMPILE=/path/to/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- oldconfig
Code:
make ARCH=arm CROSS_COMPILE=/path/to/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
Code:
make ARCH=arm CROSS_COMPILE=/path/to/android/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- modules
4.2 Install modules
The modules need to be installed on the SD card partition, so you need to boot your phone into recovery and mount the SD card. Then execute the following command.
Code:
sudo make ARCH=arm CROSS_COMPILE=/path/to/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- INSTALL_MOD_PATH=/path/to/sdcard modules_install
In order for the WLAN kernel module to work the following files need to be copied from the GAOSP ROM to the /etc/ folder on the phone:
rtecdc.bin
nvram.txt
4.3 Minimal boot file system
A boot file system (a.k.a. initramfs) is needed to start the debian boot process. Create a folder called minimal_initramfs with the follwoing content:
Code:
minimal_initramfs/
|-- dev/
|-- init*
|-- mnt/
| `-- root/
|-- proc/
|-- sbin/
| `-- busybox*
`-- sys/
A binary of busybox can be downloaded from the busybox website (use busybox-armv4tl). The file "init" is actually a shell script with the following content:
Code:
#!/sbin/busybox sh
# initramfs pre-boot init script
# Something (what?) needs a few cycles here
/sbin/busybox sleep 1
# Populate /dev
/sbin/busybox mknod /dev/mmcblk1p1 b 179 9
# Mount the root filesystem, second partition on micro SDcard
/sbin/busybox mount -t ext2 -o noatime,nodiratime /dev/mmcblk1p1 /mnt/root
# Transfer root to SDcard
exec /sbin/busybox switch_root /mnt/root /sbin/init
The directory structure must then be compressed. To do this run the following sequence of commands when in the minimal_initramfs directory:
Code:
find . | cpio --quiet -H newc -o | gzip > ../minimal.cpio.gz
4.4 Creating the image
For creating the image you need the tool mkbootimg which you can find in android_bootimg_tools.tar.gz. Run the following command to create the boot image from the initramfs and the kernel you created above:
Code:
./mkbootimg --kernel /path/to/Galaxo-kernel/arch/arm/boot/zImage --ramdisk /path/to/minimal.cpio.gz --cmdline "fbcon=font:VGA8x8" --pagesize 2048 --base 10000000 -o debian_boot.img
5. Configuring network
5.1 Setting up the interface
Your /etc/network/interfaces file on the phone should look like this:
Code:
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
5.2 Setting up wireless encryption
For network configuration we'll be using wpa_supplicant which we already installed in one of the above steps. On the phone create the file /etc/wpa_supplicant.conf with the following content. Please enter the correct values for ssid, psk and key_mgmt for your network:
Code:
network={
ssid="YourSSID"
psk="YourSecretPassword"
key_mgmt=WPA-PSK
priority=11
}
5.3 Loading drivers
In order for the WLAN kernel module to be loaded add the following line to /etc/modules:
Code:
bcm4325 firmware_path=/etc/rtecdc.bin nvram_path=/etc/nvram.txt
6. Flashing the boot image and booting into Debian
Now it's finally time to finally flash the previously created boot image. At this time, be sure that you only have your Galaxy connected to your PC. Otherwise you might brick any other connected phone. On the PC run
Code:
sudo fastboot flash boot debian_boot.img
Then boot the Galaxy into fastboot mode by pressing "call" when powering on the phone.
When the process is finished the phone will boot into Debian and automatically connect to your wireless network (if the set-up was correct). You can now connect to the phone through ssh and enjoy your new pocket server.
If you may ever want to boot into android again, you just need to flash the original boot.img that you created with nandroid:
Code:
sudo fastboot flash boot boot.img
7. Bluetooth
7.1 Compile brcm_patchram_plus
For getting bluetooth operational it is necessary to use Broadcom's brcm_patchram_plus software. As it is not available as a Debian Squeeze package, we need to compile it ourselves. So we need to install the following packages on the phone:
Code:
apt-get install git gcc make libbluetooth-dev
Then it's possible to download the sources:
Code:
git clone (FIX this url)https :// github . com / MarkMendelsohn / brcm_patchram.git
And compile the tool using:
Code:
make
7.2 Activating bluetooth
In order for bluetooth to work the following files need to be copied from the GAOSP ROM to the same folder on the phone that you compiled the brcm_patchram_plus in:
BCM4325D1_004.002.004.0153.0156.hcd
After that it's possible to execute the followig commands:
Code:
echo 0 > /sys/class/rfkill/rfkill0/state
echo 1 > /sys/class/rfkill/rfkill0/state
./brcm_patchram_plus -d --enable_hci --baudrate 3000000 --use_baudrate_for_download --patchram BCM4325D1_004.002.004.0153.0156.hcd /dev/ttyHS0
The last command will never terminate and you will get a lot of output due to the (-d) switch. After starting a new console, you will be able to scan for bluetooth devices using:
Code:
hcitool -i hci0 scan
7.3 Connecting a keyboard
I'm using a Rapoo E6100 keyboard and the following procedure worked fine for me. It should be similar with other keyboards.
Code:
apt-get install python-bluez python-gobject python-dbus bluez-compat
Code:
cd /usr/share/doc/bluez/examples
Press pairing button on keyboard then
Code:
./simple-agent hci0 6C:xx:xx:xx:xx:xx
(use the bluetooth address of your keyboard, according to the scan in the previous chapter)
The script will ask for a PIN. I entered 0000 on both the keyboard and phone and the keyboard was registered.
Code:
./test-device trusted 6C:xx:xx:xx:xx:xx yes
(again use the bluetooth address of your keyboard)
Code:
hidd --connect 6C:xx:xx:xx:xx:xx
Now you should be good to use your keyboard.
7.4 Automate patchram
Right now, the KB is not automatically connected on boot, because the patchram command from above needs to be executed on every boot. Hence the following commands should be added to /etc/rc.local (before the exit 0):
Code:
#Activate bluetooth
echo 0 > /sys/class/rfkill/rfkill0/state
echo 1 > /sys/class/rfkill/rfkill0/state
/path/to/brcm_patchram_plus --enable_hci --baudrate 3000000 --use_baudrate_for_download --patchram /path/to/BCM4325D1_004.002.004.0153.0156.hcd /dev/ttyHS0 &
8. Setting the clock
I was having trouble with my clock forgetting the day and time after each reboot. It was a flaw in my kernel config. In the current version of attached config file this is fixed. Anyway, I'm also running NTP to have the clock more accurate.
Code:
apt-get install ntpdate
NTP already come nicely pre-configured (thanks, Debian maintainers!). After that the timezone can be selected using
Code:
dpkg-reconfigure tzdata
9. GUI (X.org)
X.org works almost out-of-the-box since we already pathed the kernel as described in chapter 4 above. Based on the description from (FIX this url)https :// code . google . com/p/linux-on-android/wiki/BasicSteps only two minor changes have been made:
The framebuffer device is at /dev/fb0 instead of /dev/graphcics/fb0
I use evdev instead of tslib, because it provided better results for me (thanks to pabs from #debian-mobile for pointing me there)
9.1 Install X.org
All we need to do is download the software
Code:
apt-get install xorg xserver-xorg-video-fbdev xserver-xorg-input-evdev
9.2 Configuring X.org
Now create /etc/X11/xorg.conf:
Code:
Section "InputDevice"
Identifier "Touchscreen"
Driver "evdev"
Option "Device" "/dev/input/event2"
EndSection
Section "Device"
Identifier "Configured Video Device"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
Option "DPMS" "false"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Section "ServerLayout"
Identifier "Default"
Screen "Default Screen"
InputDevice "Touchscreen" "CorePointer"
EndSection
Section "ServerFlags"
Option "DefaultServerLayout" "Default"
EndSection
9.3 Testing X.org
For testing X.org I've installed icewm and created the following /root/.xsession
Code:
#!/bin/sh
xterm&
exec icewm
Then just type in startx from the console and you have X. Of course you will have to change this to whatever you need or maybe even make X start on boot.
9.4 Boot into Browser
For my target system I want the phone to directly boot into a browser. This can easily be achieved by using the nodm package:
Code:
apt-get install nodm
and midori as browser:
Code:
apt-get install midori
We'll also need a user account. I called my user "default". But naturally you can of course choose whatever you like.
Code:
adduser default
Then nodm has to be configured in /etc/default/nodm:
Code:
# nodm configuration
# Set NODM_ENABLED to something different than 'false' to enable nodm
NODM_ENABLED=true
# User to autologin for
NODM_USER=default
# xinit program
NODM_XINIT=/usr/bin/xinit
# First vt to try when looking for free VTs
NODM_FIRST_VT=7
# X session
NODM_XSESSION=/etc/X11/Xsession
# Options for the X server
NODM_X_OPTIONS='vt7 -nolisten tcp'
# If an X session will run for less than this time in seconds, nodm will wait an
# increasing bit of time before restarting the session.
NODM_MIN_SESSION_TIME=60
And we have to create ~/.xsession for our user:
Code:
#!/bin/bash
midori -e Fullscreen &
exec icewm
A few tweaks in the icewm config (~/.icewm/preferences) will make the window manager look more nicely:
Code:
WorkspaceNames=" 1 "
TaskBarShowCPUStatus=0
TaskBarDoubleHeight=0
TaskBarShowWorkspaces=0
TaskBarShowMailboxStatus=0
TaskBarShowNetStatus=0
TimeFormat="%H:%M"
TaskBarShowWindowListMenu=1
TaskBarShowShowDesktopButton=0
10. Power management
The kernel is already configured with many different frequency govenors. Also the default govenor is set to "ondemand" but for some reason the when looking at /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor it's using the "performance" govenor. This can be solved by simply installing cpufreq-utils:
Code:
apt-get install cpufrequtils
The default settings are already using "ondemand", which seems to be a good choice. Anyway, further optimisations can be done in /etc/default/cpufrequtils if needed.
The phone still gets a little too warm for my taste (I think warmer than in android). Maybe there's something that could fix this, but I'm not an expert.
11. Known shortcomings
The whole set-up is in a really, REALLY early alpha stage
If any of the hardware buttons is touched in text mode the phone crashes (does not happen when in X.org)
The screen will time-out after some time, I have no idea how to wake it up again
Did I mention this is in an alpha stage?
12. Future improvements
Switching to a newer kernel version: The latest version of GAOSP runs on kernel version 2.6.35, while this guide is using 2.6.27. I have experimented with 2.6.29, but I had trouble getting a working frame buffer.
Switching to the latest version of debian (wheezy).
History
History:
2013-12-27:
Initial version
2013-12-30:
Minimized the the init script by removing mounts for /dev, /proc, and /sys. These are not necessary and mounting /dev prevents Debian's udev from working correctly.
2014-01-19:
Added description for bluetooth.
2014-01-25:
Added description for graphical user interface (X.org).
2014-01-25:
Boot into X/Browser and power management
2014-01-26:
Updated clock settings
Video proof
Hi all,
to get a better understanding what this is all about please watch the attached video. Please excuse the poor quality and the fingerprints on the screen.
As you can see the framebuffer output has a few quirks, but hopefully this will work out as soon as X is working.
BR,
Frank
All goals achieved
Okay, I think I now have achieved all goals. I can connect to WiFi and bluetooth. And there is a graphical user interface. Now the tweaking can start (first thing that comes to mind is powersaving). I really created this guide for myself, but I'd be happy to know if anyone else has interest in this topic.
Nice, I am interested. One question!
frank47 said:
Okay, I think I now have achieved all goals. I can connect to WiFi and bluetooth. And there is a graphical user interface. Now the tweaking can start (first thing that comes to mind is powersaving). I really created this guide for myself, but I'd be happy to know if anyone else has interest in this topic.
Click to expand...
Click to collapse
Nice, I am interested. One question!
I would like to use this device to get some data from the sensors. I have tested some apps in Android GAOSP to read the sensors in the i7500, but instead of using android apps, it could be very interesting to have a debian.
Have you tried to do it? Do you think it is possible? Is it too tricky to get a stable debian running an app to send sensors' data to another debian? I could help if you see it is interesting.
What is your opinion? Thank you...
Hi PabloGN,
there are a lot of entries in /proc and /sys. I think it's likely to be possible te access the sensors. For now, I have only looked at the battery status. Don't know if you'd consider that a sensor. Anyway, you would probably have to re-write your software to use those devices instead of using already existing Java libs for android. Hard to tell,*if it's worth the effort.
BR,
Frank
PabloGN said:
I would like to use this device to get some data from the sensors.
Click to expand...
Click to collapse
This is the list of input devices on my the i7500:
Code:
[email protected]:~# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="I7500_headset"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=4 0 0 0 0 0 0 0
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="I7500_keypad"
P: Phys=
S: Sysfs=/devices/virtual/input/input1
U: Uniq=
H: Handlers=kbd event1
B: EV=3
B: KEY=800180 100000 0 41000800 1c1ec0 0 0 0
I: Bus=0000 Vendor=0000 Product=0000 Version=0033
N: Name="melfas-tsi-touchscreen"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=event2
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=11000003
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="compass"
P: Phys=
S: Sysfs=/devices/virtual/input/input3
U: Uniq=
H: Handlers=event3
B: EV=9
B: ABS=20305ff
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="proximity_i2c"
P: Phys=
S: Sysfs=/devices/virtual/input/input4
U: Uniq=
H: Handlers=event4
B: EV=1
So, it should at least be possible to read the compass and proximity sensor data form /dev/input/event3 and /dev/input/event4. Maybe there's more and I just haven't compiled it into the kernel or it's accessed in some other way. Sorry, the sensors are not part of my use case so far.
I'm only using /dev/input/event2 (touchscreen) in my xorg.conf as an input device. Works like a charm.
Good luck with your endeavour. If you want me to test something or send you the output of some command, just ask here or by PM.
This NOT a Q&A thread. Only people working out the problem are welcome.
okay , so as of flashing even supersu beta version BETA-SuperSU-v2.49 this is the issue i'm guessing for our device
for reference the firmware release api in question is Android 5.1 , API Level 22
Code:
[email protected]:/# adb logcat -d | grep F/
F/appproc ( 305): Error changing dalvik-cache ownership : Permission denied
F/libc ( 305): Fatal signal 6 (SIGABRT), code -6 in tid 305 (app_process32_o)
F/appproc ( 1026): Error changing dalvik-cache ownership : Permission denied
F/libc ( 1026): Fatal signal 6 (SIGABRT), code -6 in tid 1026 (app_process32_o)
F/appproc ( 1389): Error changing dalvik-cache ownership : Permission denied
F/libc ( 1389): Fatal signal 6 (SIGABRT), code -6 in tid 1389 (app_process32_o)
F/appproc ( 1758): Error changing dalvik-cache ownership : Permission denied
F/libc ( 1758): Fatal signal 6 (SIGABRT), code -6 in tid 1758 (app_process32_o)
F/appproc ( 2123): Error changing dalvik-cache ownership : Permission denied
F/libc ( 2123): Fatal signal 6 (SIGABRT), code -6 in tid 2123 (app_process32_o)
F/appproc ( 2482): Error changing dalvik-cache ownership : Permission denied
F/libc ( 2482): Fatal signal 6 (SIGABRT), code -6 in tid 2482 (app_process32_o)
[email protected]:/#
after looking at the script i ran and got this
Code:
[email protected]:/# adb shell ls -al /system/bin/app*
[COLOR="Red"]lrwxrwxrwx root root 2014-03-07 10:19 app_process -> /system/xbin/daemonsu
lrwxrwxrwx root root 2014-03-07 10:19 app_process32 -> /system/xbin/daemonsu
-rwxr-xr-x root shell 13588 2015-07-02 14:29 app_process32_original[/COLOR]
-rwxr-xr-x root shell 13588 2014-03-07 10:19 app_process_init
-rwxr-xr-x root shell 57688 2015-07-02 14:29 applypatch
-rwxr-xr-x root shell 213 2015-07-02 14:29 appops
-rwxr-xr-x root shell 215 2015-07-02 14:29 appwidget
undoing that with this
Code:
rm -f app_process app_process32
ln -sf /system/bin/app_process32_original /system/bin/app_process
"resolved" the "error" so if you flashed supersu thinking YAY ROOT ! and ended up with what you got you need to run what i did to
regain what you had.
SO, linking daemonsu in a different way is probably the thing but, how?
so far selinux is still alive i am trying out a patch @RunasSudo suggested here
http://forum.xda-developers.com/goo...orrect-to-compile-permissive-selinux-t3074761
also i am trying to figure out how app_process works
@thisisapoorusernamechoice
sorry for hijacking your thread. m
Okay, so with a modified adbd in /sbin i achieve a root prompt through adb
Note - at this point i do have full control over the system. yay!
but at the cost of blank display and no functions of hardware input [no touch hard buttons] awww (frowny face)
interesting note, the stock adbd has root access/privelege when executing adb reboot recovery.
does anyone have a lead on how to bind a block device to a tcp port ?
something like this, but that works, and as a service maybe?
cat /dev/whatever | nc -l 2345
okay if i'm seeing this right...,
Code:
F/appproc ( 305): Error changing dalvik-cache ownership : [COLOR="Red"]Permission denied[/COLOR]
F/libc ( 305): Fatal signal 6 (SIGABRT), code -6 in [COLOR="Red"]tid[/COLOR] 305 (app_process32_o)
my gues would be selinux denial based on wrong/incorrect type id
from file contexts
Code:
/system/bin/app_process32 u:object_r:[COLOR="Red"]zygote_exec[/COLOR]:s0
from zygote.te
Code:
# zygote
[COLOR="Red"]type[/COLOR] zygote, domain;
type [COLOR="Red"]zygote_exec[/COLOR], exec_type, file_type;
soooooo when the shuffling around of app_process* happens and /system/xbin/daemonsu is linked to /system/bin/app_process
should daemonsu instead of being [from supersu installer script]
Code:
/system/xbin/daemonsu 0755 u:object_r:system_file:s0
be
Code:
/system/xbin/daemonsu 0755 u:object_r:zygote_exec:s0
?
i don't think it sepolicy version 26, same as sm-t530nu, i'm also using the sm-t53nu's LL kernel source release for my sm-t330nu LP kernel build, so it's not the knox ****ery in the kernel source. so it's the actual policy itself ?
I'm going to do an experiment by flashing/writing the system.img.ext4 from the sm-t530nu LP release with a modified boot.img
to the sm-t330nu [post LP release flash]
If it works it would effectively be a downgrade to 5.0.X
This has worked with @sub77 's LP builds for sm-t530nu to "port" them to sm-t330nu soooo
more to come ?
okay, sooooo
now that my sm-t330nu has the official LP release installed, i CAN flash the system.img from the official sm-t530nu to it and boot successfully,
so i was right about the tied to firmware thing.
Now after a few different tests i am unable to "downgrade" my boot.img to match the sm-t530nu release version wise, policy and all
and remain at android 5.1.1 NNNYYYAAAAAHHHHHHHHH ! [WHEW okay , glad to get that out.. ]
SO, i flashed supersu to see what would happen and got the same result as before BUT, totally sepolicy contexts
Without restoring system or doing the meatball surgery from the previous post, i instead manually changed the policy context
of /system/xbin/daemonsu through adb in recovery
[note- you must enbale dev-options--->debugging
Code:
adb reboot recovery
adb shell mount /system
adb shell
chcon u:object_r:zygote_exec:s0 /system/xbin/daemonsu
chattr +i /system/xbin/daemonsu
reboot
SHINY ! no root. but boots
Code:
[email protected]:/system/bin/.ext $ ls -Z /system/xbin/daemonsu
-rwxr-xr-x root root u:object_r:zygote_exec:s0 daemonsu
Okay so now we need to know proper context for
/system/xbin/su
/system/bin/.ext/.su
hmmmm... i am going outside to play.
Nature sucks, the resolution is terrible ! xD
okay android 5.1.1 samsung policy context for system libraries is
Code:
u:object_r:system_library_file:s0
okay so far nutz..,
i found this for setool utility [setools-android-sepolicy-inject] project by @Mikos
http://forum.xda-developers.com/android/software/setools-android-sepolicy-inject-t2977563
i've forked his sources https://github.com/xmikos/setools-android
adjusted for api, and will try this method.
Android NDK
wget https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86.bin
m
okay,
got Miko's toolkit compiled, this is the output of seinfo
Code:
\[email protected]:/ $ seinfo
Statistics for policy file: /sepolicy
Policy Version & Type: v.26 (binary, mls)
Classes: 86 Permissions: 271
Common classes: 5
Sensitivities: 1 Categories: 1024
Types: 1169 Attributes: 162
Users: 1 Roles: 2
Booleans: 0 Cond. Expr.: 0
Allow: 14802 Neverallow: 0
Auditallow: 0 Dontaudit: 401
Type_trans: 458 Type_change: 0
Type_member: 0 Role allow: 0
Role_trans: 0 Range_trans: 0
Constraints: 59 Validatetrans: 0
Initial SIDs: 27 Fs_use: 19
Genfscon: 43 Portcon: 0
Netifcon: 0 Nodecon: 0
Permissives: 0 Polcap: 2
[email protected]:/ $
i'm looking for someone who can run me through how sepolicy injection works specifically.
I don't know enough to interpret a generic example.
what i can understand right now is daemonsu disguised as app_process cannot access/change what it needs to in dalvik-cache due to incorrect/wrong -tid if that's the right way to say it.
this again
Code:
F/appproc ( 305): Error changing dalvik-cache ownership : Permission denied
F/libc ( 305): Fatal signal 6 (SIGABRT), code -6 in tid 305 (app_process32_o)
Mikos said the following as to command line syntax
Mikos said:
Hello, the syntax is simple, if you want comparison with supolicy, here is one example (taken from my SnooperStopper app):
Code:
supolicy --live 'allow vdc init fifo_file {read write getattr}'
is equivalent to:
Code:
sepolicy-inject -s vdc -t init -c fifo_file -p read,write,getattr -l
Click to expand...
Click to collapse
m
so how much progress you have done so far? need any help?
jazzespresso said:
so how much progress you have done so far? need any help?
Click to expand...
Click to collapse
Jazz,
have you ever done any work with sepolicy, setools ?
is there a way or do you know the right way to do the policy injection part of what Mikos described for
su and daemonsu ?
when i run strings on the sepolicy binary i do find su_exec.
so i'm still at daemonsu being the culprit. @Chainfire does make it clear the there is a hijack of app_process going on
and i do believe it works for other devices running a "state sanctioned" 5.1.1 so this is/has to be a dicky samsung move.
also how to determine the correct tid if that is indeed what i'm looking for. [see OP]
m
Will look into that, not sure how much differences between android 5.0.X and 5.1.1..
jazzespresso said:
Will look into that, not sure how much differences between android 5.0.X and 5.1.1..
Click to expand...
Click to collapse
It seems to be all sepolicy, i had to adblock and put in my usual apps minus root apps via adb push.
Swapping policy from the 5.0 boot.img reseults in no visuals or input but at adb/terminal i have access,
It just occured to me that i have not yet tried the policy swap and then applied root, hmm.
After i unscrew my system, i upgraded but forgot to change from sid so now wifi is totally boned, xD
I'll try that out, i figure it's something with ueventd.?
On disabling the policy it's complete no go so far.
In spite of modding init.rc
To disab;e sepolicy reload, to write to sys/fs/selinux/enable/0 and trying kernel cmdline edits for enforce=0 androidboot.selinux=0 etc, results
In bogus disable or no boot and dead adbd. Fun fun fun !
this is a copy/paste from my earlier sepolicy trip from galaxy tab 3 forum, putting here for reference
On-Device Policy Files
/sepolicy: Kernel binary policy
/file_contexts: File security contexts
/property_contexts: Property security contexts
/seapp_contexts: App security contexts
/system/etc/security/mac_permissions.xml: App certificate to seinfo mapping
On mac_permissions.xml
●At build time, mac_permissions.xml signature tag names (e.g. @platform) are rewritten to the actual
certificate value extracted from .pem file specified by external/sepolicy/keys.conf
.●build/tools/releasetools/sign_target_files_apks rewrites mac_permissions.xml with updated certificate values for new keys.
System Apps by Certificate
●mac_permissions.xml:
<signer signature= @platform" >
<seinfo value="platform" />
</signer>
●
seapp_contexts:
user=_app seinfo=platform domain=platform_app
type= app_data_file
---------------------------------------------------
Okay so what is this _u _r _t suffix stuff?
• _u – SELinux user
eg: system_u – used for running system services
• _r – SELinux role
eg: system_r – for daemons and background processes
• _t – SELinux type / domain
eg:httpd_t
you can change a single domain to permissive mode
-------------------------------------
the original thread is here, i forgot all about mac_permissions.xml when swapping policy
http://forum.xda-developers.com/galaxy-tab-3/general/se-linux-policy-information-thread-t2865457
moonbutt74 said:
It seems to be all sepolicy, i had to adblock and put in my usual apps minus root apps via adb push.
Swapping policy from the 5.0 boot.img reseults in no visuals or input but at adb/terminal i have access,
It just occured to me that i have not yet tried the policy swap and then applied root, hmm.
After i unscrew my system, i upgraded but forgot to change from sid so now wifi is totally boned, xD
I'll try that out, i figure it's something with ueventd.?
On disabling the policy it's complete no go so far.
In spite of modding init.rc
To disab;e sepolicy reload, to write to sys/fs/selinux/enable/0 and trying kernel cmdline edits for enforce=0 androidboot.selinux=0 etc, results
In bogus disable or no boot and dead adbd. Fun fun fun !
Click to expand...
Click to collapse
I was thinking about getting policy from the 5.0 boot.img and try and see...not sure if it would work - you may try and let me know your results
1) 5.0 sepolicy file.
2) initrd.img current one
3) initrd.img current one
It has been long time man I worked on it or dig this stuff......hmmm....hmmm....Galaxy S6 developers got root on 5.1.1, so this should be not so hard.....
okay so the sesearch string looks something like this , yielding the following output
Code:
[email protected]:/storage/AIK-Linux/ramdisk# sesearch -A -s shell -t system [COLOR="Red"]-c file[/COLOR] sepolicy
Found 3 semantic av rules:
allow shell newAttr33 : file { ioctl read write getattr lock open } ;
allow newAttr7 newAttr33 : file { ioctl read write getattr lock open } ;
allow appdomain newAttr33 : file { ioctl read write getattr lock open } ;
but if i leave out the -c [class=name] option it works sort of like a wild-card and i get this
Code:
[email protected]:/storage/AIK-Linux/ramdisk# sesearch -A -s shell -t system sepolicy
Found 20 semantic av rules:
allow shell system_server : process { transition siginh rlimitinh } ;
allow shell newAttr33 : process getattr ;
allow shell newAttr33 : file { ioctl read write getattr lock open } ;
allow shell newAttr33 : dir { ioctl read getattr search open } ;
[COLOR="Red"]allow shell newAttr33 : lnk_file { ioctl read getattr lock open } ;[/COLOR]
allow appdomain domain : process getattr ;
allow domain system_server : fd use ;
allow newAttr7 newAttr33 : file { ioctl read write getattr lock open } ;
allow newAttr7 newAttr33 : dir { ioctl read getattr search open } ;
[COLOR="Red"] allow newAttr7 newAttr33 : lnk_file { ioctl read getattr lock open } ; [/COLOR]
allow newAttr1 binderservicedomain : fd use ;
allow newAttr1 binderservicedomain : binder { call transfer } ;
allow appdomain system_server : fd use ;
allow appdomain system_server : fifo_file { ioctl read write getattr lock append open } ;
allow appdomain system_server : tcp_socket { read write getattr getopt shutdown } ;
allow appdomain system_server : unix_stream_socket { read write getattr getopt setopt shutdown } ;
allow appdomain newAttr33 : file { ioctl read write getattr lock open } ;
allow appdomain newAttr33 : dir { read getattr search open } ;
allow appdomain newAttr33 : lnk_file { read write getattr open } ;
allow appdomain system_server : binder { call transfer } ;
the lnk_file ones seem interesing, i'm not sure if write is the correct perm or if it's readwrite
using sepolicy inject i've been adding to that list like so
Code:
sepolicy-inject -s appdomain -t newAttr33 -c lnk_file -p write -P sepolicy -o sepolicy-UNdead
but nothing yet, as i go further i will learn more, i think it's finding out what need to be made permissive, getting a read on audit and allow rules don't seem to work, i'm using debian's sepolicy dev tools, as well as Miko's set, and the originating source for sepolicy-inject as well.
finding the permissions/av denial connected to daemonsu being prevented from changing dalvik-cache ownership is what i think i'm looking for
but i'm not 100% on that, though when i
Code:
chcon u:object_r:su_exec:s0 su
, i do get a denial in terminal when i reboot and run su, so i'm still uncertain if su is the culprit.
what makes you think su is the culprit, it is because 5.1.1?
jazzespresso said:
what makes you think su is the culprit, it is because 5.1.1?
Click to expand...
Click to collapse
well, su runs the daemon right the daemon and supolicy need root privelege to run and load
for the portion of the logcat, changing ownership in dalvik-cache fails because damonsu hijacks the app_process/32
changing ownership is the function of chown which needs root priveleges, that particular function happens after the init process,
the init process work with root privelege for the beginning stages of the boot process then lock down and throws over to the system,
without the system's su functioning that process of changing dalvik cache ownership fails and sigabrt , the system hangs.
the reason i'm not 100% sure it's su is because when i chcon app_process/32 -> /xbin/daemonsu to ubject_r:zygote_exec
then the process goes through so...
moonbutt74 said:
well, su runs the daemon right the daemon and supolicy need root privelege to run and load
for the portion of the logcat, changing ownership in dalvik-cache fails because damonsu hijacks the app_process/32
changing ownership is the function of chown which needs root priveleges, that particular function happens after the init process,
the init process work with root privelege for the beginning stages of the boot process then lock down and throws over to the system,
without the system's su functioning that process of changing dalvik cache ownership fails and sigabrt , the system hangs.
the reason i'm not 100% sure it's su is because when i chcon app_process/32 -> /xbin/daemonsu to ubject_r:zygote_exec
then the process goes through so...
Click to expand...
Click to collapse
re-moved
Jazz,
what i am actually going to say is;
pingpong root is a fail, i tried it a few days ago.
dumping general links into this thread is not help.
Linking DIRECTLY to kernel patches/mods etc., is better.
I am looking at the s6 source from the thread you linked to.
I don't think kernel version will make too much of a difference.
The interest, MY interest is in how to mod the default sepolicy to unbreak root.
I do NOT want permissive, i want enforcing with root functioning correctly.
I am getting a better hang of the sepolicy tools but have yet to find what needs changing adjusting
I did manage to disable [set permissive] the policy AND achieve root BUT with display,touch,input broken as before. [grumble]
In the furture please remove quoted text when you reply to post. Thanks.
m
moonbutt74 said:
Jazz,
what i am actually going to say is;
pingpong root is a fail, i tried it a few days ago.
dumping general links into this thread is not help.
Linking DIRECTLY to kernel patches/mods etc., is better.
I am looking at the s6 source from the thread you linked to.
I don't think kernel version will make too much of a difference.
The interest, MY interest is in how to mod the default sepolicy to unbreak root.
I do NOT want permissive, i want enforcing with root functioning correctly.
I am getting a better hang of the sepolicy tools but have yet to find what needs changing adjusting
I did manage to disable [set permissive] the policy AND achieve root BUT with display,touch,input broken as before. [grumble]
In the furture please remove quoted text when you reply to post. Thanks.
m
Click to expand...
Click to collapse
sorry....removed the links and references on my previous post....
jazzespresso said:
sorry....removed the links and references on my previous post....
Click to expand...
Click to collapse
Jazz,
security: SELinux: Avoid enabling enforcing by conventional flag
as to this https://github.com/djvoleur/V_925R4_BOF7/commit/3e33f1fb5538fb2f0f055e9035fe8885a3471322
i'll give it a try and see what happens, but i still want sepolicy enforcing.
@jazzespresso
EDIT - okay i tried it out straight and no-go, but looking at the diff between our selinuxfs.c
and the one you linked to i see that we have a compile/build flag
#ifdef CONFIG_ALWAYS_ENFORCE
//If build is user build and enforce option is set, selinux is always enforcing
new_value = 1;
[blah blah blah]
selinux_enforcing = new_value;
there's some more but i think you get the idea of where i'm going with this.
the new_value change has been used before to success so it will work with our kernel source,
it's just a matter of getting it right. =]