Nexus 7 (2013) + USB-to-ethernet adapter ASIX: eth0 appears in netcfg.
ifconfig eth0 192.168.11.2 netmask 255.255.255.0 up
route add default gw 192.168.11.1 dev eth0
But it's impossible to ping the gateway. Has anyone managed to make work Nexus 7 (2013) + USB-to-ethernet?
Are you using stock? Because I'm pretty sure that has to be added before it will work.
On my MK808b Android stick, the Deva had to manually add the .ko files and other stuff.
Sent from my Nexus 7 using xda premium
gregoiregentil said:
Nexus 7 (2013) + USB-to-ethernet adapter ASIX: eth0 appears in netcfg.
ifconfig eth0 192.168.11.2 netmask 255.255.255.0 up
route add default gw 192.168.11.1 dev eth0
But it's impossible to ping the gateway. Has anyone managed to make work Nexus 7 (2013) + USB-to-ethernet?
Click to expand...
Click to collapse
I was able to ping the gateway using the above commands, minus the "up" on the end of the ifconfig line, (rooted Nexus 7 2013, ASIX usb ethernet) but have not been able to get DNS working... tried the command below but it did not work:
setprop net.dns1 8.8.8.8
Just found this:
code.google.com/p/android/issues/detail?id=58868
going to try dhcp tonight...
Thanks tog42. That's a useful post. After dozens of tries, I have managed to get a dhcp addresss on the rooted Nexus 7 2013 from my router. My router doesn't seem to do a great job and that's part of the problem. But I still don't manage to set a fixed IP address on the tablet and then ping the router.
Yes, I noticed dhcpd_eth0 missing in the logcat. I'm happy to see that there is a filed bug for this.
Hi, I can't seem to get DNS working with DHCP or a static setup... was DNS working when you got your DHCP address?
Thanks!
tog42 said:
Hi, I can't seem to get DNS working with DHCP or a static setup... was DNS working when you got your DHCP address?
Thanks!
Click to expand...
Click to collapse
Hi tog42 did you manage to get this working? (or anyone else?)
According to one of the manufacturers, there's a small error in the code for 4.3 on the N7 2013. Currently, no device natively works as designed with this model.
They've been notified and the next software update should incorporate it. Otherwise, the above might work in some cases.
Can you tell us your source of this statement?
BobjGear.
+ the representative of a Chinese OEM. (that one I'm not at liberty to disclose)
I have confirmed that USB ethernet works automatically with DHCP after applying the init.flo.rc patch from here: https://code.google.com/p/android/issues/detail?id=58868
And how would one go about doing that merge?
That was in 15J ... Does 15Q have that already done?
danvee said:
And how would one go about doing that merge?
That was in 15J ... Does 15Q have that already done?
Click to expand...
Click to collapse
15Q is not fixed... I used the boot.img from the 15Q factory image and used the tools from here: http://forum.xda-developers.com/showthread.php?t=2319018 to split the boot.img which unpacked the ramdisk, patched the file in the ramdisk, repacked it, created a new boot.img and flashed it. (Made a couple of mistakes the first time though and the Nexus was stuck in a boot loop but was able to restore from one of my backups.)
Sounds wayyy too complex for the average user.
Might need to wait for them to officially incorporate it.
tog42 said:
15Q is not fixed... I used the boot.img from the 15Q factory image and used the tools from here: http://forum.xda-developers.com/showthread.php?t=2319018 to split the boot.img which unpacked the ramdisk, patched the file in the ramdisk, repacked it, created a new boot.img and flashed it. (Made a couple of mistakes the first time though and the Nexus was stuck in a boot loop but was able to restore from one of my backups.)
Click to expand...
Click to collapse
Hey Tog42, I used the same tools, split_boot did the split and unpack, only edited init.flo.rc as per the patch, then used repack_ramdisk and mkbootimg (using the outputs from boot_info). Flashed and it boot loops so I restored it.
So any tips? Maybe I made the same mistakes you did the first time round?
Appreciate any advice.
cz32 said:
Hey Tog42, I used the same tools, split_boot did the split and unpack, only edited init.flo.rc as per the patch, then used repack_ramdisk and mkbootimg (using the outputs from boot_info). Flashed and it boot loops so I restored it.
So any tips? Maybe I made the same mistakes you did the first time round?
Appreciate any advice.
Click to expand...
Click to collapse
Hi cz32, I was using different tools when I was having the issues with boot loops... these tools worked the first time, I used all of the info provided by boot_info. Also, I patched the init.flo.rc file (patch originalfile patchfile) instead of manually editing it.
Fix was done.
Check here for progress on getting it added into the next update.
http://code.google.com/p/android/issues/detail?id=58868
For those of you who got this working would any of you be so kind as to post some sort of walkthrough or guide as to how you exactly did it? I really would like to get this USB to ethernet adapter working with my N7. Thanks!
tog42 said:
Hi cz32, I was using different tools when I was having the issues with boot loops... these tools worked the first time, I used all of the info provided by boot_info. Also, I patched the init.flo.rc file (patch originalfile patchfile) instead of manually editing it.
Click to expand...
Click to collapse
Thanks that's ok now, it was the ramdisk offset.
So I have a bootable device with "service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL" and "service iprenew_eth0 /system/bin/dhcpcd -n" in the init.flo.rc. Switching off WiFi and plugging in doesn't work, but if I plug in then go into terminal and 'dhcpcd eth0' then it gets an IP and the browser connects, but mail apps, play store etc have no connectivity.
This is an LTE btw..
Any thoughts?
edit: some variables;
1. Boot nexus with wifi switched off, run dhcpcd eth0 = no connectivity except able to browse IP addresses in chrome
2. Use wifi then switch wifi off, plug in eth0 (same router) and dhcpcd = normal chrome browsing, no other apps have connectivity.
[email protected]:/ # dmesg | grep eth
<6>[15811.115203] asix 2-1:1.0: eth0: register 'asix' at usb-msm_hsusb_host-1, ASIX AX88772 USB 2.0 Ethernet, f4:f9:51:e1:2a:48
<6>[15894.166778] ADDRCONF(NETDEV_UP): eth0: link is not ready
<6>[15894.237640] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
<6>[15894.239318] asix 2-1:1.0: eth0: link down
<6>[15896.031555] asix 2-1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
<7>[15904.802978] eth0: no IPv6 routers present
With wlan off and etho0 connected:
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
eth0 UP 0.0.0.0/0 0x00001043 f4:f9:51:e1:2a:48
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
[email protected]:/ # dhcpcd eth0
dhcpcd[2638]: version 5.5.6 starting
dhcpcd[2638]: eth0: rebinding lease of 192.168.0.13
dhcpcd[2638]: eth0: acknowledged 192.168.0.13 from 192.168.0.1
dhcpcd[2638]: eth0: checking for 192.168.0.13
dhcpcd[2638]: eth0: leased 192.168.0.13 for 86400 seconds
dhcpcd[2638]: forked to background, child pid 2673
[email protected]:/ # cat /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
eth0 00000000 0100A8C0 0003 0 0 226 00000000 0 0 0
eth0 0000A8C0 00000000 0001 0 0 226 00FFFFFF 0 0 0
[email protected]:/ # ip route show
default via 192.168.0.1 dev eth0 metric 226
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.13 metric 226
And with wlan working:
[email protected]:/ # ip route show
default via 192.168.0.1 dev wlan0
192.168.0.0/24 dev wlan0 scope link
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.9
192.168.0.1 dev wlan0 scope link
[email protected]:/ # cat /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT
wlan0 00000000 0100A8C0 0003 0 0 0 00000000 0 0 0
wlan0 0000A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0
wlan0 0000A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0
wlan0 0100A8C0 00000000 0005 0 0 0 FFFFFFFF 0 0 0
[email protected]:/ # getprop net.dns1
192.168.0.1
[email protected]:/ # getprop net.dns2
(ISP dns)
hotsammysliz said:
For those of you who got this working would any of you be so kind as to post some sort of walkthrough or guide as to how you exactly did it? I really would like to get this USB to ethernet adapter working with my N7. Thanks!
Click to expand...
Click to collapse
I don't have it working, but as far as I can tell I've followed the same steps as people who do and it could just be different for LTE.
So the steps are (and ask if you want me to expand on any of these), and maybe get tog42 to confirm!
- Obtain boot.img - either from Google or from the device
- Get these tools http://forum.xda-developers.com/showthread.php?t=2319018
- Use split_boot to unpack the img, this will create a Ramdisk folder './split_boot boot.img' (have the img and tools in the same folder)
- In Ramdisk folder, edit or patch init.flo.rc as per http://code.google.com/p/android/issues/detail?id=58868
- Use repack_ramdisk to pack the ramdisk folder that split_boot unpacked './repack_ramdisk ramdisk boot.img-ramdisk.gz'
- Use boot_info to obtain the info needed for the next step './boot_info boot.img'
- Use mkbootimg to put the now packed ramdisk and kernel back into boot.img './mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz --base 0x80200000 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=flo user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3' --pagesize 2048 -o new_boot.img' (changing the base, cmdline, pagesize to match the info you obtained with boot_info)
- Backup the device
- Unlock the bootloader (example http://www.wugfresh.com/nrt/)
- Flash the new boot.img temporarily to test
- If it works flash permanent.
Problems I had
- First attempt wouldn't boot, the ramdisk offset was incorrect when using mkbootimg, the mkbootimg I have doesn't allow it to be changed so I used a hex editor and changed it on the complete boot.img.
- DHCP doesn't work as per my last post, I'm not sure if I have missed something or if something else is required for an LTE, as I think most people would be doing this on a wifi. Anyone please comment!
So take that as a draft and get someone who actually made it work to confirm first
almost there
cz32 said:
I don't have it working, but as far as I can tell I've followed the same steps as people who do and it could just be different for LTE.
So the steps are (and ask if you want me to expand on any of these), and maybe get tog42 to confirm!
- Obtain boot.img - either from Google or from the device
- Get these tools http://forum.xda-developers.com/showthread.php?t=2319018
- Use split_boot to unpack the img, this will create a Ramdisk folder './split_boot boot.img' (have the img and tools in the same folder)
- In Ramdisk folder, edit or patch init.flo.rc as per http://code.google.com/p/android/issues/detail?id=58868
- Use repack_ramdisk to pack the ramdisk folder that split_boot unpacked './repack_ramdisk ramdisk boot.img-ramdisk.gz'
- Use boot_info to obtain the info needed for the next step './boot_info boot.img'
- Use mkbootimg to put the now packed ramdisk and kernel back into boot.img './mkbootimg --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz --base 0x80200000 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=flo user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3' --pagesize 2048 -o new_boot.img' (changing the base, cmdline, pagesize to match the info you obtained with boot_info)
- Backup the device
- Unlock the bootloader (example http://www.wugfresh.com/nrt/)
- Flash the new boot.img temporarily to test
- If it works flash permanent.
Problems I had
- First attempt wouldn't boot, the ramdisk offset was incorrect when using mkbootimg, the mkbootimg I have doesn't allow it to be changed so I used a hex editor and changed it on the complete boot.img.
- DHCP doesn't work as per my last post, I'm not sure if I have missed something or if something else is required for an LTE, as I think most people would be doing this on a wifi. Anyone please comment!
So take that as a draft and get someone who actually made it work to confirm first
Click to expand...
Click to collapse
I need help!
first thanks for your input it helped me throught :highfive: and must I mention I used Cygwin and did all the steps until I tried to use mkbootimg :silly:
At that point it was responding:
-bash: ./mkbootimg: cannot execute binary file
so I did file mkbootimg and I realized it was a 64bit file so I went ahead and found a 32bit version of the file on github.com
I tried to run the cmd with mkbootimg.32bit and it responded the same thing:
-bash: ./mkbootimg.32bit: cannot execute binary file
I'm almost done with the procedure as I know how to flash the boot.img after that, im just stuck at mkbootimg...
Any help with this? and please dont say it's cygwin and theres nothing to do, perhaps I need a package or a file for cygwin to execute mkbootimg??
Kind Regards,
Eastwoods
Related
LAYOUT MAPPING COMPLETE! THANKS EVERYONE!
based on XXJF5 stock 2.1#1
256 KB -- bml1, contain boot.bin (262144 bytes), Primary Boot Loader (low-level hardware initialization)
256 KB -- bml2, contains PIT file first 512 bytes
10240 KB -- bml3 /dev/block/stl3 /efs
1280 KB -- bml4 contain Sbl.bin (1310720 bytes) Secondary Boot Loader (loads the Linux kernel and passes the necessary arguments)
1280KB -- bml5 contains Secondary Boot Loader (for recovery, ect)
5120KB -- bml6 param.lfs /mnt/.lfs j4fs
7680KB -- bml7 contain zImage and initramfs
7680KB -- bml8 empty
293376KB -- bml9 factoryfs.rfs ( /system RFS Partition) /dev/block/stl9
137216KB -- bml10 dbdata.rfs ( /dbdata RFS Partition) /dev/block/stl10
35840KB -- bml11 cache.rfs ( /cache RFS Partition) /dev/block/stl11
12800KB -- bml12 modem.bin
Hello husq510
Thanks for this infos, i'll follow this thread closely because i'm looking for the place where ServiceMode settings are stored.
anyone tried writing to the bml directly?
husq510 said:
bash-3.2# ls -al /dev/block/bml*
1280 KB -- bml4 kernel (zImage)
293376KB -- bml9 factoryfs.rfs ( /system RFS Partition)
Click to expand...
Click to collapse
interesting. so ive dd the bml4 and bml9 of optus australia stock 19000DTJF3. now anyone want to point me in the direction of creating an odin package out of it.
i whoner .... how can bml4 be the zImage? bml4=1.2MB, zImage=5.8MB ?? also if it should just contain the kernel without initram, it's still about 2.6MB? any idea?
jodue said:
i whoner .... how can bml4 be the zImage? bml4=1.2MB, zImage=5.8MB ?? also if it should just contain the kernel without initram, it's still about 2.6MB? any idea?
Click to expand...
Click to collapse
you are right, cant be. then kernel must be in some other bml place, seems bml7.
gandalf:~/Desktop/android/bml ackie$ grep "booting the kernel" *
Binary file bml7.dump matches
gandalf:~/Desktop/android/bml ackie$ hexdump -n 128 bml7.dump | grep "e1a0 0000 e1a0"
0000000 0000 e1a0 0000 e1a0 0000 e1a0 0000 e1a0
0000020 0002 ea00 [2818 016f] [0000 0000] [a510 005b] <- zimage magic number 0x016F2818, start at 0x0, end at 0x005b10a5
0000030 7001 e1a0 8002 e1a0 2000 e10f 0003 e312
0000040 0001 1a00 0017 e3a0 3456 ef12 2000 e10f
0000050 20c0 e382 f002 e121 0000 0000 0000 0000
0000060 00d0 e28f 307e e890 0001 e050 000a 0a00
0000070 5000 e085 6000 e086 c000 e08c 2000 e082
0000080
Offset into zImage Value Description
0x24 0x016F2818 Magic number used to identify this is an ARM Linux zImage
0x28 start address The address the zImage starts at
0x2C end address The address the zImage ends at
so if you start at 0x0 of bml7 and read untill offset inside 0x2c for XXJF5 is 0x005b10a5 you have your zImage.
husq510 said:
so if you start at 0x0 of bml7 and read untill offset inside 0x2c for XXJF5 is 0x005b10a5 you have your zImage.
Click to expand...
Click to collapse
so is it safe to assume after 0x005b10a5 is the ram disk?
Hello Folks.
I found some interesting bits in bml12.
"Service Mode" datas strings are in it, like show these example :
Code:
strings ./bml12 | grep Diamond
[SND] TurnON UtaAudioModifyHf(prev_Diamond_mode:0x%x)
`[SND]DiamondVoice_GetMode : path = 0x%x, Diamond_mode = 0x%x
`[SND]DiamondVoice_GetMode : Diamond_mode = 0x%x
[SND]DiamondVoiceTXcfgMSG
`[SND] DiamondVoice_RxInit : DiamondVoice_Mode_v = 0x%x
Diamond Solution
[9] Diamond Solution
[SND]DiamondVoice_Config : DiamondVoice_Mode_v = 0x%x, Diamond_mode= 0x%x
strings ./bml12 | grep DEBUG
MN_GPS_DEBUG_INFO_CNF
GPS_DEBUG_INFO_CNF
[1] DEBUG SCREEN
[2] DEBUG INFO
DEBUG INFO
DEBUG MSG 115200
DEBUG MSG SETTING FAIL
DEBUG MSG 921600
DEBUG MSG ON
DEBUG MSG OFF
AUDIO_LIB_DSP_DEBUG_GRP1
AUDIO_LIB_DSP_DEBUG_GRP2
AUDIO_LIB_DSP_DEBUG_GRP3
AUDIO_LIB_DSP_DEBUG_GRP4
AUDIO_LIB_DSP_DEBUG_GRP5
AUD_LIB_DSP_DEBUG
IPC_MISC_PHONE_DEBUG
IPC_MISC_DEBUG_LEVEL
IPC_SVC_DEBUG_DUMP
IPC_SVC_DEBUG_STRING
And I found my IMEI number in bml3
edit :
+ some MAC hardware address too (but not the Wifi one)
+ the HW Version : MP 0.800
I guess that bml3 is device-specific.
But I don't know if it's the source of specific values or just contains copy of hardware-related data.
In the first case, modifying bml3 would allow to change IMEI or other sensitive values ^^
nonato said:
so is it safe to assume after 0x005b10a5 is the ram disk?
Click to expand...
Click to collapse
nope, to extract the ram disk, u hv to find the magic number of gz and extract the gzip image out... i was able to get the directory listing of the ramdisk but not the content..
the other problem is after u get the ramdisk and do any modifications, u hv to reverse the process.. not an easy job but if anyone found a solution, please share.
anyone try writing to the bml directly? dd doesnt seem to work
anyway, its possible to extract the image and use odin to flash after tar but if can write to bml directly, clockworkmod can effectively backup/restore the kernel.. (just a thought)
raspdeep said:
nope, to extract the ram disk, u hv to find the magic number of gz and extract the gzip image out... i was able to get the directory listing of the ramdisk but not the content..
the other problem is after u get the ramdisk and do any modifications, u hv to reverse the process.. not an easy job but if anyone found a solution, please share.
anyone try writing to the bml directly? dd doesnt seem to work
anyway, its possible to extract the image and use odin to flash after tar but if can write to bml directly, clockworkmod can effectively backup/restore the kernel.. (just a thought)
Click to expand...
Click to collapse
No, you cant write directly to bml.
Data write to a sector involves following sequence of low-level flash operations:
1. Block copy for back-up
2. Block erase
3. Copy back for non-modified pages
4. Writing the sector data to the modified page
These sequences of operations are not atomic, so a write request to this block device driver is prone to data corruption. For this reason, read-only file systems such as CRAMFS are adequate to run on top of this block device driver.
use this small script to extract your current zImage:
offset=`dd if=/dev/block/bml7 bs=1 skip=44 count=4 2>/dev/null| hexdump -e '1/4 "%d"' -e '"\n"'`
echo $offset
dd if=/dev/block/bml7 bs=1 count=$offset of=/sdcard/zImage_backup
husq510 said:
use this small script to extract your current zImage:
Click to expand...
Click to collapse
nice, thanks for sharing that!
i just extracted initramfs from bml7, file attached, unzip and cpio -i
some file differs from leshak:
modules/dpram.ko
modules/multipdp.ko
modules/dhd.ko
modules/stgloc
initramfs/init.rc
.info/rootfs.info
default.prop
init.smdkc110.sh
sbin/recovery
sbin/init
how do u extract this?
gunzip -c initrd-cpio.zip | cpio -i does not work.. gave errors
how did you dump and make the zip file you have attached?
thanks,
husq510 said:
i just extracted initramfs from bml7, file attached, unzip and cpio -i
some file differs from leshak:
modules/dpram.ko
modules/multipdp.ko
modules/dhd.ko
modules/stgloc
initramfs/init.rc
.info/rootfs.info
default.prop
init.smdkc110.sh
sbin/recovery
sbin/init
Click to expand...
Click to collapse
raspdeep said:
how do u extract this?
gunzip -c initrd-cpio.zip | cpio -i does not work.. gave errors
Click to expand...
Click to collapse
[email protected] you have to use unzip instead gzip, cuz forum dislike .gz format, so I had to use standard zip.
mkdir initramfs
mv initrd-cpio.zip initramfs
cd initramfs
unzip initrd-cpio.zio
cat initrd.cpio | cpio -i --no-absolute-filenames
Hey, did somebody already tried to dump one or some bml partitions and restore them later ?
I guess this could be the ultimate backup tool.
I took a look into this and found that
bml2 : PIT file is here
bml5 : Sbl.bin is here
I opened it with a Hexeditor and compared with things from the firmware.
My device is running on JP3, froyo, at the moment.
thanks i will update first post. layout mapping is complete now!
I am trying to use HTC Desire's openvpn to connect to dd-wrt router with a static key, the following is the config file used:
remote xxx.xxx.xxx
port 2008
dev tap
secret static.key
proto udp
comp-lzo
route-gateway 192.168.1.1
redirect-gateway
I used openvpn setting 0.4.7. the openvpn told me it's connected but when I tried to connect the sites blocked by my carrier, I still cannot open it (I can bypass carrier's blocking if I use PC for the same setting). Anyone advice? Btw, I've use the DNS fix in 0.4.7 and changed dns to 8.8.8.8
redirect-gateway doesn't work for me 2
try to check routing table after connect
if find answer pls share
appears that route is not working, still pointing to my local router ip address 192.168.0.1, my remote router should be 192.168.1.1
any advice?
The following are the commands I executed from terminal and results I got!
cd sdcard/openvpn
openvpn --config abc.ovpn
------------
Thu Jan 6 01:14:04 2011 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Jul 26 2010
Thu Jan 6 01:14:04 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Jan 6 01:14:04 2011 WARNING: file 'static.key' is group or others accessible
Thu Jan 6 01:14:04 2011 LZO compression initialized
Thu Jan 6 01:14:05 2011 TUN/TAP device tap0 opened
RTNETLINK answers: No such process
Thu Jan 6 01:14:05 2011 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Jan 6 01:14:05 2011 UDPv4 link local (bound): [undef]:2008
Thu Jan 6 01:14:05 2011 UDPv4 link remote: xxx.xxx.xxx.xxx:2008
Thu Jan 6 01:14:32 2011 Peer Connection Initiated with xxx.xxx.xxx.xxx:2008
Thu Jan 6 01:14:32 2011 Initialization Sequence Completed
Does it mean that I don't have tun/tap file installed? How can I find the file? I am using ReflexTSense Rom 1.5.1
anyone can help on this?
cnwatch said:
anyone can help on this?
Click to expand...
Click to collapse
if you installed busybox under /system/xbin, you need to create /system/xbin/bb directory and symlink the ifconfig and route command there:
note: if your desire is not S-OFF you need to do this in recovery
Code:
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
then reinstall openvpn and tell the installation your binaries are under /system/xbin/bb (the default).
Also, make sure to flag the "Fix HTC Routes" in the Advanced options of OpenVPN Settings.
moebius83 said:
if you installed busybox under /system/xbin, you need to create /system/xbin/bb directory and symlink the ifconfig and route command there:
note: if your desire is not S-OFF you need to do this in recovery
Code:
mkdir /system/xbin/bb
ln -s /system/xbin/busybox /system/xbin/bb/ifconfig
ln -s /system/xbin/busybox /system/xbin/bb/route
then reinstall openvpn and tell the installation your binaries are under /system/xbin/bb (the default).
Also, make sure to flag the "Fix HTC Routes" in the Advanced options of OpenVPN Settings.
Click to expand...
Click to collapse
booted into recovery and add the ln -s /system/xbin/busybox /system/xbin/bb/ifconfig as route is already linked.
then I tried to reinstall the openvpn installer but it says failed and deletes the openvpn file and I have to recover from nandroid backup. pls advise, also, can you share the settings for openvpn settings, my settings as follows:
Tun modules settings
- Load module using : insmod
- path to un module: /system/lib/modules/tun.ko
Path to configurations: /sdcard/openvpn
Path to openvpn binary: /system/xbin/openvpn
Fix HTC Router: Enabled
cnwatch said:
booted into recovery and add the ln -s /system/xbin/busybox /system/xbin/bb/ifconfig as route is already linked.
then I tried to reinstall the openvpn installer but it says failed and deletes the openvpn file and I have to recover from nandroid backup. pls advise, also, can you share the settings for openvpn settings, my settings as follows:
Tun modules settings
- Load module using : insmod
- path to un module: /system/lib/modules/tun.ko
Path to configurations: /sdcard/openvpn
Path to openvpn binary: /system/xbin/openvpn
Fix HTC Router: Enabled
Click to expand...
Click to collapse
same identical config, I'm using stock froyo htc rom
I was wondering if I could mount an empty.img file so that I could add executable into it and chmod 777 them or what ever the number is maybe 666.
Then I would add the location to my $PATH variable in the "/system/etc/mkshrc" file so I could execute those programs from any directory.
What say you?
Has this been done before?
It works!
Well, I wen ahead and tried it out, I figured "What the hell, its not like I have to format my sd card." It worked!
So what I did
1) I changed directories to Downloads. ("cd ~/Downloads")
2) I created a directory for my image in Downloads, and moved into it. (mkdir image && cd ./image)
3) I created an empty 4 gig image called apps.img using dd ("dd if=/dev/zero of=apps.img bs=1MB count=0 seek=4096")
4) I formated it to ext2 ("mke2fs -F apps.img")
5) I used adb to push it to my phone ("adb push ~/Downloads/image/apps.img /storage/sdcard0/Download/")
6) Then on my phone as su I mounted the image ("mount -o loop '/storage/sdcard0/Download/apps.img' '/data/local/mnt' ") {with single quotes around the directories, the double quotes wrap the whole actual command, you don't need them} [EDIT: I used bash on the phone to do this, ie I "su" [enter] ; "bash" [enter] ; "THE ABOVE COMMAND" [enter]
7) To test I used the python interpreter as my executable so I created a folder in /data/local/mnt called apps,(note* I should have made that folder on my pc before I pushed it to my phone to ensure that the foder was actually in the apps.img file.) I created two more folders "bin" and "lib" using "File Manager" on my phone. I then moved what I needed to run python into those folders (though you'll see I forgot something)
8) I added PYTHONHOME PYTHONPATH and added the bin folder I created to $PATH in the /system/etc/bash/bashrc file (Ask and I'll explain). If you don't have bash the mkshrc file is located "/system/etc/mkshrc" on your phone (if its Sprint SGSIII) adding environment variable there will accomplish the same thing, sorta.
9) I connected my phone to pc w/usb, opened up a teminal on pc, started an adb shell
10)........
Code:
[email protected]:~$ adb devices
List of devices attached
xxxxxxxx device
[email protected]:~$ adb shell
[email protected]:/ $ su
[email protected]:/ # bash
void endpwent()(3) is not implemented on Android
localhost / # which python
/data/local/mnt/apps/bin/python
localhost / # python
'import site' failed; use -v for traceback
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21)
[GCC 4.4.3] on linux-armv7l
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import sys
>>> import math
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named math
>>> import io
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/io.py", line 63, in <module>
ImportError: No module named _fileio
>>>
localhost / # exit
[email protected]:/ # ^D
[email protected]:/ $ ^D
[email protected]:~$
I'm thinking that if I can get my mkbootimg tools to work, I would mod an init script to mount the apps.img and then create links for each file in say '/mnt/apps/bin' create a link*in '/system/bin'. this should allow for phones with small or near full system partition install stuff like busybox or your own pprograms. More usefull for a developer.
I wanna try this with pythonforandroid, if I can make python and its modules. accessible during early init or just before the boot process finishes in general, and use it to run python, maybe python can handle boot in a different way, or maybe just one specific. function you might needs.
one big question I have. Does the pythonforandroid interpreter run ontop of the D VM?
Edge-Case said:
I'm thinking that if I can get my mkbootimg tools to work, I would mod an init script to mount the apps.img and then create links for each file in say '/mnt/apps/bin' create a link*in '/system/bin'. this should allow for phones with small or near full system partition install stuff like busybox or your own pprograms. More usefull for a developer.
I wanna try this with pythonforandroid, if I can make python and its modules. accessible during early init or just before the boot process finishes in general, and use it to run python, maybe python can handle boot in a different way, or maybe just one specific. function you might needs.
one big question I have. Does the pythonforandroid interpreter run ontop of the D VM?
Click to expand...
Click to collapse
I don't think so. All command-line programs I know of interface directly with the kernel.
Sent from my S3 on Sense 5 (you jelly?)
CNexus said:
I don't think so. All command-line programs I know of interface directly with the kernel.
Sent from my S3 on Sense 5 (you jelly?)
Click to expand...
Click to collapse
So getting an extended set of Linux (kernel) cli programs working with Android (kernel) is a matter of having the nessissary libraries, kernel prereq., and being compiled for the target processor?
From what I have read, the Android kernel has been cut back so far from the original Linux kernel that its difficult to port "Linux apps" to Android. Something about a slimmed down version of the GNU C/C++ libraries and the Android kernel being designed to run mostly Dalvik.
I haven't tried directly running any "Linux app" (already compiled for arm) on Android yet, but my game plan for that test was to load up an .img file with the nessissary execs, libs, config, etc files (as ext3 this time) and running some scripts that get the paths variables set up and then execute the script, I wrote a short Bash script that sets up python variables and adds others to PATH etc, and it worked, I had python on the img and the img mounted to /mnt/myside and python ran but with some errors, I need to get the variables right, its driving me mad, if its not this its that, last time it was the basic "help()" command not being declaired or something.
Well thats my plan, either these "Linux apps" run on Android without problem or I am going to A) write my own kernel to be compatible with Android/ cli Linux or I am going to get as much source code as I can and practice the art of compiling against Android and/or patching the code when/where nessissary.
We'll see what happens, I've done enough today/night.
All I've done is root, reboot, disable updates, reboot, install system tools via adbfire, reboot, install ssh, reboot.
So in theory this should affect all who attempt to use it.
Installed SSH via adbFire, started via ADB shell:
ADB Shell:
Code:
[email protected]:/ $ sshstatus
ssh is not running
1|[email protected]:/ $ su
[email protected]:/ # sshstart
[3993] Nov 29 04:11:19 Running in background
Mac:
Code:
$ ssh [email protected]
Warning: Permanently added '10.10.10.117' (RSA) to the list of known hosts.
CANNOT LINK EXECUTABLE DEPENDENCIES: "libc.so" is 32-bit instead of 64-bit
ADB Shell:
Code:
[3995] Nov 29 04:11:22 Child connection from 10.10.10.115:64826
[3995] Nov 29 04:11:23 Pubkey auth succeeded for 'root' with key md5 96:54:9d:f7:95:9e:4e:27:61:b3:7e:9c:fe:57:25:72 from 10.10.10.115:64826
[3995] Nov 29 04:11:23 Exit (root): Disconnect received
Looking at the filesystem you can see that both the 32bit and 64bit library files are there (output trimmed).
Code:
[email protected]:/ # find /|grep libc
/system/lib/libc.so
/system/lib64/libc.so
If I do the crazy thing of renaming the 32bit libc (so that it does not load, forcing usage of 64bit lib) it does allow SSH to work but that is way too risky of a configuration, so I won't use that.
It sounds like there is a linker path problem. The tools probably need to be properly updated for 64-bit support.
zeroepoch said:
It sounds like there is a linker path problem. The tools probably need to be properly updated for 64-bit support.
Click to expand...
Click to collapse
Zeroepoch is exactly correct. adbFire's ssh tools are 32-bit and compiled for the ATV/1. I don't have an eta for an update, sorry.
The battery of a rooted, UsUed LG G4 running LineageOS 14.1 was accidentally allowed to drain to zero. After re-charging above 50%, the device failed to boot. The LOS boot screen "bubble on a string" animation would continue indefinitely.
The phone still booted to TWRP, download mode, and fastboot mode.
Originally, it was suspected that this was ILAPO. However, this suspicion was incorrect.
After extensive work creating a boot sector that would allow logging and a ton of help from @steadfasterX, it was discovered that various files in /data/system had been corrupted and had sizes of zero. Android would try to read values from these files, fail, and repeat.
First, a full TWRP backup of the phone was made and copied off-device. Then, I made a second backup of /data/system. Next, I deleted the following zero-byte files from /data/system using TWRP (or ADB after launching TWRP).
packages.list
packages.xml
profiles.xml
netpolicy.xml
notification_policy.xml
If this doesn't work, I would have considered deleting other zero-byte files in /data/system. I used "ls -laS" to get a size-ordered list of files in my current directory.
After a reboot, android re-created the files and booted to the lockscreen.
All of the apps in /data/data had already been cleared. Otherwise, Android would probably have choked on the differences between the user IDs that it wanted to assign to apps and the ownership of the various app folders.
The following links suggest ways to restore some apps from previously created backups
GitHub - joshuabragge/twrp-manual-restore: Automate individual app restores from an android TWRP backup
Automate individual app restores from an android TWRP backup - GitHub - joshuabragge/twrp-manual-restore: Automate individual app restores from an android TWRP backup
github.com
https://www.semipol.de/posts/2016/07/android-manually-restoring-apps-from-a-twrp-backup/
(Permanent archive: https://web.archive.org/web/2019083.../android-restoring-apps-from-twrp-backup.html)
There is no warranty on this solution. It was a makeshift effort created by an amateur. If you choose to duplicate it, you do so at your own risk. You may permanently destroy your phone.
Old post below:
I'm trying to understand whether a particular G4 (H815) has ILAPO. Its been sneezing, has a sore throat, and now can't taste anything^H^H oops, I mean:
- Previously, the phone would get hot during use.
- The phone has been UsUed.
- The battery was accidentally allowed to discharge to zero.
- After the battery was recharged, the phone was unable to boot past the Lineageos "bubble on a string" animation. The animation simply continues forever.
- The phone can boot to TWRP, fasboot, download mode, etc.
Attempts to fix:
- Tried renaming /sdcard/Android to /sdcard/Android.old but this had no effect.
- Tried clearing cache and dalvik cache but this had no effect
- (NEW) Tried attaching to computer and launching "adb logcat" during animation. Device is never found. If I remember correctly, "USB debugging" was off when the device died. (ADB does work in TWRP.)
- (NEW) Tried creating a custom 4-core (2 core for boot) boot image using the instructions here https://forum.xda-developers.com/t/...tom-x-cores-boot-image-ilapo-tempfix.3718389/ and used "fastboot flash boot boot.img" to flash it. This doesn't seem to work.
-- If I reboot into TWRP after a long period of waiting for the lineageos splash screen, I get a CPU temperature of 46 C. I don't know what temperature was generated in the same situation the modified boot image was installed.
Most of the info on ILAPO suggests that phones with it can't get past the LG logo. That is not the case here. Is this ILAPO or something different? Does anyone have ideas as to what might be an appropriate fix?
Is it possible to retrieve boot logs using TWRP in order to figure out when/where/why the boot hangs?
electricfield said:
I'm trying to understand whether a particular G4 (H815) has ILAPO. Its been sneezing, has a sore throat, and now can't taste anything^H^H oops, I mean:
- Previously, the phone would get hot during use.
- The phone has been UsUed.
- The battery was accidentally allowed to discharge to zero.
- After the battery was recharged, the phone was unable to boot past the Lineageos "bubble on a string" animation. The animation simply continues forever.
- The phone can boot to TWRP, fasboot, download mode, etc.
Attempts to fix:
- Tried renaming /sdcard/Android to /sdcard/Android.old but this had no effect.
- Tried clearing cache and dalvik cache but this had no effect
- (NEW) Tried attaching to computer and launching "adb logcat" during animation. Device is never found. If I remember correctly, "USB debugging" was off when the device died. (ADB does work in TWRP.)
- (NEW) Tried creating a custom 4-core (2 core for boot) boot image using the instructions here https://forum.xda-developers.com/t/...tom-x-cores-boot-image-ilapo-tempfix.3718389/ and used "fastboot flash boot boot.img" to flash it. This doesn't seem to work.
-- If I reboot into TWRP after a long period of waiting for the lineageos splash screen, I get a CPU temperature of 46 C. I don't know what temperature was generated in the same situation the modified boot image was installed.
Most of the info on ILAPO suggests that phones with it can't get past the LG logo. That is not the case here. Is this ILAPO or something different? Does anyone have ideas as to what might be an appropriate fix?
Is it possible to retrieve boot logs using TWRP in order to figure out when/where/why the boot hangs?
Click to expand...
Click to collapse
Sounds like the ilapo. Is the battery charged now? I don't know which LOS version you have installed but if you use mine:
follow FAQ #7 of my LOS thread
steadfasterX said:
Sounds like the ilapo. Is the battery charged now? I don't know which LOS version you have installed but if you use mine:
follow FAQ #7 of my LOS thread
Click to expand...
Click to collapse
Thank you for your reply. You seem to know more about G4 issues than anyone. I really appreciate your help.
The battery is charged now.
Unfortunately, I am using the microg version of LOS 14.1, rather than your 16.0.
I tried following the instructions in your FAQ #7, but I can't do step 1 (boot android). The only way for me to exit the bootloop is by removing the battery. There is no "debug" in /cache after I mount cache in TWRP.
I also looked at FAQ #1. ADB never finishes waiting for the device. In fact "lsusb" doesn't show the phone during OS boot (ADB is fine when TWRP is loaded).
Any other ideas?
electricfield said:
Thank you for your reply. You seem to know more about G4 issues than anyone. I really appreciate your help.
The battery is charged now.
Unfortunately, I am using the microg version of LOS 14.1, rather than your 16.0.
I tried following the instructions in your FAQ #7, but I can't do step 1 (boot android). The only way for me to exit the bootloop is by removing the battery. There is no "debug" in /cache after I mount cache in TWRP.
I also looked at FAQ #1. ADB never finishes waiting for the device. In fact "lsusb" doesn't show the phone during OS boot (ADB is fine when TWRP is loaded).
Any other ideas?
Click to expand...
Click to collapse
As written in my mentioned FAQ taken battery out is needed in your case. Step 2 iirc.
If you dont use my LOS then no way. The cache/debug is something I've added and no one else has.
Option1:
You can just flash my LOS 16 or /e/ ROM (take a full backup before in TWRP) and use that for debugging your current issue. Why using microg btw? /e/ is great
Option2:
The other option would be pulling the boot img of your current LOS (in TWRP: adb pull /dev/block/bootdevice/by-name/boot ) and rebuilding it as insecure (i.e. usb debug on and adb root ) but if you never did that before it it will be hard i guess. AiK might work here or using mAid which includes bootimgtool.
Option3:
Also you can attach that boot img here and if i ever find the time i can do option2 for you but don't expext that this happens soon .
Thank you again for your help.
I'm a little afraid that installing a new & different ROM will increase the level of complexity. I'll do it if I must, though.
I started looking at option #2. Retrieving the boot image was fine, but unpacking presents a problem.
$ ./unpack-bootimg.sh boot.img.original
Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.
Is there a guide anywhere?
electricfield said:
Thank you again for your help.
I'm a little afraid that installing a new & different ROM will increase the level of complexity. I'll do it if I must, though.
I started looking at option #2. Retrieving the boot image was fine, but unpacking presents a problem.
$ ./unpack-bootimg.sh boot.img.original
Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.
Is there a guide anywhere?
Click to expand...
Click to collapse
thousands.. But the problem is that our device is sensitive when it comes to packaging the boot.img again. Bootimgtool is working in 9 of 10 times though.
Boot mAid . Open a terminal. Type bootimgtool --help .important is to use "-v qcom". Then extract the ramdisk with gzip and cpio, then modding the default.prop to make it insecure , then using gzip and cpio again to rebuild the ramdisk, finally using bootimgtool to construct the boot.img again. Sounds harder than it is but i have no access to my pc until monday so i cannot give all the needed cmds atm. There are plenty of guides out there and tools ofc which allow unpack,repack etc. That's why i mentioned AIK which does exactly the above but it fails sometimes to build a correct working boot.img.
So my suggestion is try your luck with one of the tools or wait until I've access to my pc. Consider joining my TG group then for easier support (see my sig)
steadfasterX said:
thousands.. But the problem is that our device is sensitive when it comes to packaging the boot.img again. Bootimgtool is working in 9 of 10 times though.
Boot mAid . Open a terminal. Type bootimgtool --help .important is to use "-v qcom". Then extract the ramdisk with gzip and cpio, then modding the default.prop to make it insecure , then using gzip and cpio again to rebuild the ramdisk, finally using bootimgtool to construct the boot.img again. Sounds harder than it is but i have no access to my pc until monday so i cannot give all the needed cmds atm. There are plenty of guides out there and tools ofc which allow unpack,repack etc. That's why i mentioned AIK which does exactly the above but it fails sometimes to build a correct working boot.img.
So my suggestion is try your luck with one of the tools or wait until I've access to my pc. Consider joining my TG group then for easier support (see my sig)
Click to expand...
Click to collapse
Thank you once again. I'm really impressed by how much help you have been able to give so far.
Unfortunately, I have no phone with which to join the Telegram group.
I made the modified boot image, but adb is still unable to speak to the phone during boot. I note that lsusb does not show the phone during boot -- maybe the system hangs before USB is activated. However, I could have made the boot image incorrectly.
Here is what I did:
[[email protected] extract]$ bootimgtool -i boot
Image size: 41943040
Page size: 4096
Kernel size: 22456976
Ramdisk size: 1672742
Second stage size: 0
Device tree size: 0
Kernel load address: 0x00008000
Ramdisk load address: 0x01000000
Second stage load address: 0x00f00000
Device tree load address: 0x00000000
Tags load address: 0x00000100
Product name:
Command line: maxcpus=4 boot_cpus=0-1 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 msm_rtb.filter=0x37 boot_cpus=0-1 buildvariant=userdebug
[[email protected] extract]$ bootimgtool -x boot -v qcom
[[email protected] extract]$ gunzip ramdisk
[[email protected] ex]$ cpio -i < ../ramdisk
In default.prop, I changed:
ro.adb.secure=0
ro.secure=0
security.perf_harden=0
ro.debuggable=0
persist.sys.usb.config=mtp,adb
In default.prop, I added:
persist.service.adb.enable=1
persist.service.debuggable=1
[[email protected] ex]$ find > /tmp/filelist
[[email protected] ex]$ cpio -o < /tmp/filelist > ../ramdisk.modified
This produces
-rw-r--r-- 1 android users 4166400 Jan 2 17:29 ramdisk.gunzip.original
-rw-r--r-- 1 android users 4162048 Jan 2 17:31 ramdisk.modified
-rw-r--r-- 1 android users 1672742 Jan 2 17:16 ramdisk.img.original
I don't understand why the "modified" gunzipped file is slightly smaller than the original.
[[email protected] extract]$ mv ramdisk.modified.gz ramdisk.img
[[email protected] extract]$ cp boot boot.original
[[email protected] extract]$ bootimgtool -v qcom -c boot
Overwrite 'boot'? [y/N] y
-rw-r--r-- 1 android users 25370624 Jan 2 17:38 boot
-rw-r--r-- 1 android users 41943040 Jan 2 17:37 boot.original
I am wary because I don't understand why the new file is so much smaller than the original. However, I decided to proceed. Uploaded modified boot to /sdcard/boot.modified
Inside adb:
/dev/block/platform/soc.0/f9824900.sdhci/by-name # ls -al boot
lrwxrwxrwx 1 root root 21 Jan 1 04:16 boot -> /dev/block/mmcblk0p38
/dev/block/platform/soc.0/f9824900.sdhci/by-name # cp /sdcard/boot.modified /dev/block/mmcblk0p38
Plugged in device. On computer "adb wait-for-device". Reboot device.
Unfortunately, no action from adb.
electricfield said:
Thank you once again. I'm really impressed by how much help you have been able to give so far.
Unfortunately, I have no phone with which to join the Telegram group.
I made the modified boot image, but adb is still unable to speak to the phone during boot. I note that lsusb does not show the phone during boot -- maybe the system hangs before USB is activated. However, I could have made the boot image incorrectly.
Here is what I did:
[[email protected] extract]$ bootimgtool -i boot
Image size: 41943040
Page size: 4096
Kernel size: 22456976
Ramdisk size: 1672742
Second stage size: 0
Device tree size: 0
Kernel load address: 0x00008000
Ramdisk load address: 0x01000000
Second stage load address: 0x00f00000
Device tree load address: 0x00000000
Tags load address: 0x00000100
Product name:
Command line: maxcpus=4 boot_cpus=0-1 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 msm_rtb.filter=0x37 boot_cpus=0-1 buildvariant=userdebug
[[email protected] extract]$ bootimgtool -x boot -v qcom
[[email protected] extract]$ gunzip ramdisk
[[email protected] ex]$ cpio -i < ../ramdisk
In default.prop, I changed:
ro.adb.secure=0
ro.secure=0
security.perf_harden=0
ro.debuggable=0
persist.sys.usb.config=mtp,adb
In default.prop, I added:
persist.service.adb.enable=1
persist.service.debuggable=1
[[email protected] ex]$ find > /tmp/filelist
[[email protected] ex]$ cpio -o < /tmp/filelist > ../ramdisk.modified
This produces
-rw-r--r-- 1 android users 4166400 Jan 2 17:29 ramdisk.gunzip.original
-rw-r--r-- 1 android users 4162048 Jan 2 17:31 ramdisk.modified
-rw-r--r-- 1 android users 1672742 Jan 2 17:16 ramdisk.img.original
I don't understand why the "modified" gunzipped file is slightly smaller than the original.
[[email protected] extract]$ mv ramdisk.modified.gz ramdisk.img
[[email protected] extract]$ cp boot boot.original
[[email protected] extract]$ bootimgtool -v qcom -c boot
Overwrite 'boot'? [y/N] y
-rw-r--r-- 1 android users 25370624 Jan 2 17:38 boot
-rw-r--r-- 1 android users 41943040 Jan 2 17:37 boot.original
I am wary because I don't understand why the new file is so much smaller than the original. However, I decided to proceed. Uploaded modified boot to /sdcard/boot.modified
Inside adb:
/dev/block/platform/soc.0/f9824900.sdhci/by-name # ls -al boot
lrwxrwxrwx 1 root root 21 Jan 1 04:16 boot -> /dev/block/mmcblk0p38
/dev/block/platform/soc.0/f9824900.sdhci/by-name # cp /sdcard/boot.modified /dev/block/mmcblk0p38
Plugged in device. On computer "adb wait-for-device". Reboot device.
Unfortunately, no action from adb.
Click to expand...
Click to collapse
Ok i haven't followed every step bc I'm in half sleep mode already but you did one step wrong : you cant use cp like you did to copy the boot img. Either use the IMG button within TWRP flash menu or use fastboot flash boot boot.img to actually flash the modded boot img
Thank you, once again.
I think that something must be wrong with the boot image.
After "fastboot flash boot boot.modified", I get a blue light. The screen is blank with a cursor in the upper-left hand corner.
"fastboot flash boot boot.original" restores it to its previous state. i.e., it gets to the first lineageos splash screen bubble.
I'm suspicious of the difference between the file sizes of the original and modified boot images.
electricfield said:
Thank you, once again.
I think that something must be wrong with the boot image.
After "fastboot flash boot boot.modified", I get a blue light. The screen is blank with a cursor in the upper-left hand corner.
"fastboot flash boot boot.original" restores it to its previous state. i.e., it gets to the first lineageos splash screen bubble.
I'm suspicious of the difference between the file sizes of the original and modified boot images.
Click to expand...
Click to collapse
Ignore the size diff. That's bc of diff compressing tools but does not matter. Your cpio cmd is unusual . Cpio has switches to create directories and that is not used in yours above . Thats likely the reason why it does not boot at all. Again sorry that i can't help better atm but without my pc..
Thanks.
I changed the ramdisk extraction command to:
gzip -dc ../ramdisk.img | cpio -imd
and the creation command to:
find . ! -name . | LC_ALL=C sort | cpio -o -H newc -R root:root | gzip > ../new-boot.img-ramdisk.gz
Bootimgtool then produced a boot image that booted. After fastboot flash, the device is in the same state as before (splash screen).
Unfortunately, "adb wait-for-device" produces nothing. "lsusb" does not show the phone.
Can you confirm the lines to change in default.prop?
In default.prop, I changed:
ro.adb.secure=0
ro.secure=0
security.perf_harden=0
ro.debuggable=0
persist.sys.usb.config=mtp,adb
I added:
persist.service.adb.enable=1
persist.service.debuggable=1
electricfield said:
Thanks.
I changed the ramdisk extraction command to:
gzip -dc ../ramdisk.img | cpio -imd
and the creation command to:
find . ! -name . | LC_ALL=C sort | cpio -o -H newc -R root:root | gzip > ../new-boot.img-ramdisk.gz
Bootimgtool then produced a boot image that booted. After fastboot flash, the device is in the same state as before (splash screen).
Unfortunately, "adb wait-for-device" produces nothing. "lsusb" does not show the phone.
Can you confirm the lines to change in default.prop?
In default.prop, I changed:
ro.adb.secure=0
ro.secure=0
security.perf_harden=0
ro.debuggable=0
persist.sys.usb.config=mtp,adb
I added:
persist.service.adb.enable=1
persist.service.debuggable=1
Click to expand...
Click to collapse
ro.debuggable=1 is better (allows adb root)
security.perf_harden shouldn't be added (or.changed if it was there)
Rest looks ok. At least as long as you really changed these values directly or added them at the top (ro. values can be set only once)
Otherwise you should wait until tomorrow then i can share a 100% working way
electricfield said:
Thanks.
I changed the ramdisk extraction command to:
gzip -dc ../ramdisk.img | cpio -imd
and the creation command to:
find . ! -name . | LC_ALL=C sort | cpio -o -H newc -R root:root | gzip > ../new-boot.img-ramdisk.gz
Bootimgtool then produced a boot image that booted. After fastboot flash, the device is in the same state as before (splash screen).
Unfortunately, "adb wait-for-device" produces nothing. "lsusb" does not show the phone.
Can you confirm the lines to change in default.prop?
In default.prop, I changed:
ro.adb.secure=0
ro.secure=0
security.perf_harden=0
ro.debuggable=0
persist.sys.usb.config=mtp,adb
I added:
persist.service.adb.enable=1
persist.service.debuggable=1
Click to expand...
Click to collapse
Oh wait! Pls share the bootimgtool command you are using to create the new boot.img
Thank you, again.
The bootimgtool command is the same one as I used before (no change). Before running it, I renamed the new ramdisk to ramdisk.img.
bootimgtool -v qcom -c boot.modified3
Followed by bringing the phone into fastboot mode and running
fastboot flash boot boot.modified3
The phone boots to the lineageos splash screen but no response to "adb wait-for-device".
I'll try ro.debuggable=1 and get rid of security.perf_harden in a few minutes, but I wonder if they are unlikely to change anything given that the device does not show up in (linux) lsusb.
electricfield said:
Thank you, again.
The bootimgtool command is the same one as I used before (no change). Before running it, I renamed the new ramdisk to ramdisk.img.
bootimgtool -v qcom -c boot.modified3
Followed by bringing the phone into fastboot mode and running
fastboot flash boot boot.modified3
The phone boots to the lineageos splash screen but no response to "adb wait-for-device".
I'll try ro.debuggable=1 and get rid of security.perf_harden in a few minutes, but I wonder if they are unlikely to change anything given that the device does not show up in (linux) lsusb.
Click to expand...
Click to collapse
That wont change anything if adb does not come up. Just for completeness.
Ok so if you renamed it to ramdisk.img then all.good that was the thing i had in mind (that you didn't and not.used the -r switch). Well ok then without my pc the only thing i can think of might be the USB cable but thats very unlikely
Thanks again for your help.
The boot image that was flashed is definitely the correct one. I extracted it to another folder and checked it before flashing.
I re-made the boot image, but the result is the same (no adb, no device in lsusb).
What "-r switch" are you referring to in your previous message?
The USB cable works fine for ADB in TWRP, so I doubt it is the problem.
electricfield said:
Thanks again for your help.
The boot image that was flashed is definitely the correct one. I extracted it to another folder and checked it before flashing.
I re-made the boot image, but the result is the same (no adb, no device in lsusb).
What "-r switch" are you referring to in your previous message?
The USB cable works fine for ADB in TWRP, so I doubt it is the problem.
Click to expand...
Click to collapse
The -r (iirc) switch was related to bootimgtool. That way you can choose your newly created ramdisk.img but when you renamed it to ramdisk.img it works without.
Thanks.
I would deeply appreciate if you were able to guide me in making the boot image correctly when you have your computer on Monday.
On the other hand, if this method won't work, its best if I know that so that I can try the next thing....
electricfield said:
Thanks.
I would deeply appreciate if you were able to guide me in making the boot image correctly when you have your computer on Monday.
On the other hand, if this method won't work, its best if I know that so that I can try the next thing....
Click to expand...
Click to collapse
ok here you go, this must be added /changed in default.prop:
Code:
ro.adb.secure=0
ro.secure=0
ro.debuggable=1
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=adb
thumbs pressed
Thank you.
I rebuilt the boot image with these entries, but "adb wait-for-device" still does not work during boot.
Any other ideas?