User Tools

Site Tools


docs:tips_n_tricks:android:index.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docs:tips_n_tricks:android:index.html [17.05.2018 16:54 CEST] – [Install TWRP 3.0.2 unofficial on Wileyfox Swift] peterdocs:tips_n_tricks:android:index.html [13.08.2022 17:07 CEST] (current) – [Conversations / adb] peter
Line 1: Line 1:
 ====== Android ====== ====== Android ======
 +{{tag>Android USB}}
 +{{entry>Android}}
 +{{entry>USB}}
 ===== HTC Desire Z ===== ===== HTC Desire Z =====
 +{{tag>"HTC Desire Z"}}
 FIXME :!: Work in progress :!:  FIXME :!: Work in progress :!: 
 :!: Do not use :!: :!: Do not use :!:
 +
 +HTC Desire Z{{entry>HTC Desire Z}}
  
 ==== Gain temporary root and create Backup on HTC Desire Z Android 2.3 ==== ==== Gain temporary root and create Backup on HTC Desire Z Android 2.3 ====
Line 63: Line 69:
   ./root_psn   ./root_psn
   sync   sync
-   
-   
-   
-   
      
 //References:// //References://
-  +
   * http://wiki.cyanogenmod.org/w/Install_CM_for_vision   * http://wiki.cyanogenmod.org/w/Install_CM_for_vision
   * http://forum.xda-developers.com/showthread.php?t=1178912   * http://forum.xda-developers.com/showthread.php?t=1178912
   * http://forum.xda-developers.com/showthread.php?t=905261   * http://forum.xda-developers.com/showthread.php?t=905261
   * http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD   * http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
-  *  
      
-===== Use QR Code to gain Wifi Access =====+===== Use QR Code to configure Wifi Access ===== 
 +{{tag>"QR Code" Wifi}} 
 +To get Wifi{{entry>Wifi}} access by use of common QR Code{{entry>QR Code}} scanning apps, you have to QR encode the string
  
-To get Wifi access by use of common QR Code scanners, you have to QR encode the string //WIFI:S:MySSID;T:WPA2;P:MyPassword;;// which can be  generated with the open source tool //qrencode//:+//WIFI:S:MySSID;T:WPA2;P:MyPassword;;// 
 + 
 +which can be  generated with the open source tool //qrencode//:
  
   qrencode -t PNG -s 12 -l L -o MyNetwork.png 'WIFI:S:MySSID;T:WPA;P:MyPassword;;'   qrencode -t PNG -s 12 -l L -o MyNetwork.png 'WIFI:S:MySSID;T:WPA;P:MyPassword;;'
  
-Apart from replacing //MySSID// and //MyPassword// by the right values for your network, you might need to replace //WPA// by //WEP//. I was told, a //WPA2// might work as well, but //WPA// seems to be generic for both WPA and WPA2.+{{:docs:tips_n_tricks:android:mynetwork.png?196 |WIFI:S:MySSID;T:WPA;P:MyPassword;;}}Apart from replacing //MySSID// and //MyPassword// by the right values for your network, you might need to replace //WPA// by //WEP//. I was told, a //WPA2// might work as well, but //WPA// seems to be generic for both WPA and WPA2.
  
 For a hidden network, a //H:true// is expecte as a last value, seperated by another //;// and finished by a pair of them. In case of no password (no encryption), just omit the respective tags completely((meaning no //;T:...;P...// at all)). For a hidden network, a //H:true// is expecte as a last value, seperated by another //;// and finished by a pair of them. In case of no password (no encryption), just omit the respective tags completely((meaning no //;T:...;P...// at all)).
- +<WRAP clear></WRAP> 
-__References__:+{{ :docs:tips_n_tricks:android:mynetwork_xterm.png?direct&400|}} 
 +  qrencode -t ANSIUTF8 -l L 'WIFI:S:MySSID;T:WPA;P:MyPassword;;' 
 +<WRAP clear></WRAP> 
 +//References://
  
   * [[https://github.com/zxing/zxing/wiki/Barcode-Contents|Wifi Network config (Android)]]   * [[https://github.com/zxing/zxing/wiki/Barcode-Contents|Wifi Network config (Android)]]
   * Tries with the [[https://zxing.appspot.com/generator/|QR Code generator from the ZXing project]]   * Tries with the [[https://zxing.appspot.com/generator/|QR Code generator from the ZXing project]]
 Thanks to [[http://nlug.ml1.co.uk/2013/10/generate-qr-codes-for-wifi-networks/4434|Generate QR Codes for WiFi networks]] for pointing out the basiscs. Thanks to [[http://nlug.ml1.co.uk/2013/10/generate-qr-codes-for-wifi-networks/4434|Generate QR Codes for WiFi networks]] for pointing out the basiscs.
 +
 ===== Wileyfox Swift ===== ===== Wileyfox Swift =====
 +{{tag>"Wileyfox Swift" TWRP}}
 +
 ==== Install TWRP 3.0.2 unofficial on Wileyfox Swift ==== ==== Install TWRP 3.0.2 unofficial on Wileyfox Swift ====
-Some time ago, I found an unofficial build of TWRP for the Wileyfox Swift //(crackling)//: TWRP_3.0.2-0_crackling_20160524.zip +Some time ago, I found an unofficial build of TWRP{{entry>TWRP}} for the {{entry>Wileyfox Swift}}Wileyfox Swift //(crackling)//: TWRP_3.0.2-0_crackling_20160524.zip 
-<note important>For some reason, //twrp-3.2.1-0-crackling.img// from https://dl.twrp.me/crackling/ did not work for me((Flashing was possible, but ''fastboot boot <imgfile>'' gave an error and forcing boot into recovery by pressing //Power// and //Volume down// did stall on "Wileyfox" screen))</note>+<note>For some reason, //twrp-3.2.1-0-crackling.img// from https://dl.twrp.me/crackling/ did not work for me((Flashing was possible, but ''fastboot boot <imgfile>'' gave an error and forcing boot into recovery by pressing //Power// and //Volume down// did stall on "Wileyfox" screen))</note>
 Steps done: Steps done:
 +  - Enable developer options/tools on phone
 +  - Enable //adb// on phone
 +  - Enable //oem unlock// on phone
   - Extract //recovery.img// from //TWRP_3.0.2-0_crackling_20160524.zip//   - Extract //recovery.img// from //TWRP_3.0.2-0_crackling_20160524.zip//
   - Boot Wileyfox Swift into //fastboot//   - Boot Wileyfox Swift into //fastboot//
   - Connect by USB   - Connect by USB
-  - Run\\ ''fastboot flash recovery recovery.img''\\ on connected computer +  - Run <code bash> 
-  - Reboot by command\\ ''fastboot boot recovery.img''\\ on connected computer((If you boot reboot into system first, the recovery image will be overwritten by the factory default))+fastboot oem unlock 
 +fastboot -i 0x2970 oem unlock-go 
 +fastboot oem unlock-go 
 +</code> on connected computer 
 +  - Run <code bash> 
 +fastboot flash recovery recovery.img 
 +</code> on connected computer 
 +  - Reboot by command <code> 
 +fastboot boot recovery.img 
 +</code> on connected computer((If you boot reboot into system first, the recovery image will be overwritten by the factory default))
   - Reboot or shutdown from TWRP Menu   - Reboot or shutdown from TWRP Menu
 +
 ==== Transfer system from one Wileyfox Swift to another with TWRP ==== ==== Transfer system from one Wileyfox Swift to another with TWRP ====
 //This is a guide to transfer an //Android// system to a new hardware of the same type in case the old hardware is somewhat broken, but the system ist still running.//\\ //This is a guide to transfer an //Android// system to a new hardware of the same type in case the old hardware is somewhat broken, but the system ist still running.//\\
Line 107: Line 131:
  
 <note tip>Obviously, TWRP saves backups into a phone specific subdirectory and offers restores only for backups found in the appropriate subdirectory</note> <note tip>Obviously, TWRP saves backups into a phone specific subdirectory and offers restores only for backups found in the appropriate subdirectory</note>
 +<note warning>TWRP does **not** backup the data of your "internal" (emulated) SD-Card</note>
   - Install TWRP on both systems (see above)   - Install TWRP on both systems (see above)
   - Put old phone into flight mode to avoid sync operations during backup and restore   - Put old phone into flight mode to avoid sync operations during backup and restore
   - Boot old phone into recovery mode   - Boot old phone into recovery mode
   - Check time and timezone, select correct timezone eventually   - Check time and timezone, select correct timezone eventually
 +  - :!: Connect computer via USB and backup all data from internal storage to computer by //mtp//:!:
   - Select "Backup"   - Select "Backup"
   - Select storage "MicroSD"   - Select storage "MicroSD"
Line 118: Line 144:
     * Boot     * Boot
   - Start Backup   - Start Backup
-  - After backup finished, shutdown old Wileyfox Swift+  - After backup finished, shutdown old phone by choosing //Power off// from the //Reboot// Menu
   - Move all SIM cards and the SD card from old phone to new one((You might want to do a image backup of the SD card befor exposing it to the recovered system))   - Move all SIM cards and the SD card from old phone to new one((You might want to do a image backup of the SD card befor exposing it to the recovered system))
   - Boot new phone directly into recovery mode by pressing //Volume down// and //Power//, let go after approx. 5 seconds.   - Boot new phone directly into recovery mode by pressing //Volume down// and //Power//, let go after approx. 5 seconds.
   - Check time and timezone, select correct timezone eventually   - Check time and timezone, select correct timezone eventually
   - Select //Terminal// from TWRP menu\\ or\\ Connect to computer by USB and run adb shell   - Select //Terminal// from TWRP menu\\ or\\ Connect to computer by USB and run adb shell
-  - Set current time by\\ ''date -s //YYYYMMDDHHMM00//''+  - Set current time by running<code>date -s YYYYMMDDHHMM00</code>on phone
   - Do a dummy backup of some small partition (e.g. boot) to get TWRP subdirectory name of new phone   - Do a dummy backup of some small partition (e.g. boot) to get TWRP subdirectory name of new phone
   - Find new subdirectory either in ''/sdcard/TWRP/BACKUP'' or in ''/sdcard1/TWRP/BACKUP''   - Find new subdirectory either in ''/sdcard/TWRP/BACKUP'' or in ''/sdcard1/TWRP/BACKUP''
Line 142: Line 168:
     * Data     * Data
     * Boot     * Boot
-  - After restore finished, reboot into //System//.+  - Wait for restore to finish 
 +  - :!: Connect computer via USB and restore all data to internal storage from computer by //mtp//:!: 
 +  - Reboot into //System// via the //Reboot// menu.
   - Connect to computer by USB   - Connect to computer by USB
-  - Run((Yes, this ist different from the syntax above))\\ ''adb shell date //YYYYMMDD.HHMM00//''+  - On connected computer run((Yes, this ist different from the syntax above))<code>adb shell date YYYYMMDD.HHMM00</code>
   - Reboot new phone   - Reboot new phone
   - Check date and time on new phone   - Check date and time on new phone
   - Have fun!   - Have fun!
 <note warning>I recommend not to go online with the existing system on the old phone to avoid sync mischief. Factory reset the old phone as soon as you are confident, that the transfer worked well.</note> <note warning>I recommend not to go online with the existing system on the old phone to avoid sync mischief. Factory reset the old phone as soon as you are confident, that the transfer worked well.</note>
 +==== Upgrad from CyanogenOS to Android ====
 +<note important>Disable disk encryption first!</note>
 +==== Change disk encryption PIN on Android 7.2.1 Nougat ====
 +
 +  adb shell
 +  su
 +  vdc cryptfs changepw pin <old> <new>
 +
 +==== Install F-Droid Privilege Extension systemless ====
 +//(e.g. needed for system on //sqashfs// which can not be modified by TWRP)//
 +
 +  - Install Magisk
 +  - Install Magisk Systemizer extension
 +  - Download F-Droid Privilege Exteion APK. (downloading, not installing!)
 +  - connect via USB from PC and run<code>adb shell
 +su
 +cd /sdcard/Download
 +systemizer</code>
 +  - Select "Install from APK"
 +  - Enter filename of apk
 +  - Choose destination ''/system/priv-app/''
 +  - Reboot Phone
 +
 +==== Install LineageOS 14.1 ====
 +//Installing the LineageOS 14.1 update.zip on Android 7.2.1 //Nougat// following the simple((i.e. TWRP -> Install from ZIP)) update process did not work for me.//
 +
 +Install everything (but System) from Cyanogen 13.1.2 via fastboot first:
 +
 +  unzip cm-13.1.2-ZNH2KAS3LG-crackling-signed-fastboot-84f0d5200b.zip \
 +        NON-HLOS.bin hyp.mbn emmc_appsboot.mbn rpm.mbn tz.mbn sbl1.mbn \
 +        splash.img flash-radio.sh cache.img userdata.img boot.img recovery.img \
 +        android-info.txt filesmap
 +  su -
 +  for file in boot.img cache.img recovery.img userdata.img ; do fastboot flash "${file%.img}" "$file" ; sleep 1 ; done
 +  
 +Depending where you came from (i.e. what has been the previous OS Revision on the phone) you might want to flash further firmware:
 +
 +  ./flash-radio.sh
 +
 +Then reboot the //Swift// into the new fastboot:
 +
 +  fastboot reboot-bootloader
 +
 +In fastboot, boot TWRP:
 +
 +  fastboot boot twrp-3.2.3-0-crackling.img
 +  exit # finish su
 +
 +In TWRP select "Advanced", then "ADB Sideload".
 +
 +You might want to tick "Wipe Dalvik Cache" and "Wipe Cache" to avoid problems due to cache inconsistency. Then start the sideload mode by doing the "Swipe to Start Sideload"
 +
 +Then install Lineage from PC((Might finish with "(~47%)    * failed to read command: Success" on the PC while everything is reported OK in TWRP))
 +  adb sideload lineage-14.1-20180905-nightly-crackling-signed.zip
 +
 +In TWRP select "Reboot System"
 +
 +After reboot, wait for the installation process to finish. (If you think, its stuck - keep waiting provided the animated LineageOS Logo is still running)
 +
 +If you want to have //root// for apps, you need to install [[https://download.lineageos.org/extras|addonsu-14.1-arm64-signed.zip]]
 +
 +If you want to use //f-droid// with privilege extension, you need to install [[https://f-droid.org/de/packages/org.fdroid.fdroid.privileged.ota/|org.fdroid.fdroid.privileged.ota_2070.zip]]((ZIP herunterladen))
 +
 +==== Install LineageOS 16.0 over Android 7.1.2 ====
 +//Haven't done it exactly this way - but in the end, it should be the same//
 +  - Unlock phone
 +  - Install TWRP 3.2.3-0
 +  - Flash emmc_appsboot.mbn from cm-13.1.2-ZNH2KAS3LG-crackling-signed-fastboot-84f0d5200b.zip to aboot\\ ''unzip cm-13.1.2-ZNH2KAS3LG-crackling-signed-fastboot-84f0d5200b.zip emmc_appsboot.mbn''\\ ''fastboot flash aboot emmc_appsboot.mbn''
 +  - Boot into recovery (i.e. TWRP)
 +  - Wipe all data partitions (Well ... archive all needed data before ...)
 +  - Reformat /system with ext4
 +  - Format data
 +  - Reboot
 +
 +=====  =====
 +//References://
 +
 +  * https://forum.xda-developers.com/wileyfox-swift/general/root-wileyfox-swift-t3261321
 +  * https://twrp.me/wileyfox/wileyfoxswift.html
 +  * https://forum.xda-developers.com/wileyfox-swift/development/recovery-unofficial-twrp-3-0-1-0-t3350351
 +  * https://forum.xda-developers.com/wileyfox-swift/orig-development/recovery-team-win-recovery-project-t3367547
 +  * https://forum.xda-developers.com/showpost.php?p=66158015
 +  * https://twrp.me/site/update/2016/04/05/twrp-3.0.2-0-released.html
 +  * https://stackoverflow.com/questions/19496907/set-date-time-using-adb-shell
 +  * https://github.com/nelenkov/cryptfs-password-manager/issues/20
 +===== Conversations / adb =====
 +How to remove lines from //conversation//s (1.23.4) history:
 +
 +<code bash>
 +cd /scratch/peter/Anja/MotoG
 +mkdir adb-backup
 +cd adb-backup
 +adb devices -l
 +adb backup -f eu.siacs.conversations.ab -apk -obb eu.siacs.conversations
 +cp -vip eu.siacs.conversations.ab eu.siacs.conversations.ab.save
 +java -jar ~/Downloads/Android/abe-all.jar unpack eu.siacs.conversations.ab eu.siacs.conversations.tar
 +cd /tmp
 +mkdir unpack 
 +cd unpack/
 +tar -xvkpf /scratch/peter/Anja/MotoG/adb-backup/eu.siacs.conversations.tar 
 +sqlitebrowser apps/eu.siacs.conversations/db/history # remove lines from table "messages"
 +tar -tf /scratch/peter/Anja/MotoG/adb-backup/eu.siacs.conversations.tar | grep -v 'apps/eu.siacs.conversations/db/history-journal' > files.list
 +tar -cvf eu.siacs.conversations-modified.tar -T files.list
 +java -jar ~/Downloads/Android/abe-all.jar pack eu.siacs.conversations-modified.tar eu.siacs.conversations.ab
 +adb restore eu.siacs.conversations.ab
 +
 +</code>
 +
 +//References://
 +
 +  * https://stackoverflow.com/questions/18533567/how-to-extract-or-unpack-an-ab-file-android-backup-file
 +  * https://github.com/nelenkov/android-backup-extractor
 +
 +{{tag>Android eu.siacs.conversations XMPP Jabber Java adb}}
 +{{entry>Android}}
 +{{entry>eu.siacs.conversations}}
 +{{entry>XMPP}}
 +{{entry>Jabber}}
 +{{entry>Java}}
 +{{entry>adb}}
docs/tips_n_tricks/android/index.html.1526568868.txt.gz · Last modified: 17.05.2018 16:54 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki